~oxide-developers/oxide/oxide.trunk

« back to all changes in this revision

Viewing changes to qt/core/browser/oxide_qt_contents_view.cc

  • Committer: Olivier Tilloy
  • Date: 2016-03-21 21:55:56 UTC
  • mfrom: (1272.2.48 touch-selection-api)
  • Revision ID: olivier.tilloy@canonical.com-20160321215556-9oroev49kmnouyu5
Touch selection API updates:
 - enable adaptive handle orientation
 - add an 'handleDragInProgress' property to OxideQQuickTouchSelectionController
 - add a hide() method to OxideQQuickTouchSelectionController

Show diffs side-by-side

added added

removed removed

Lines of Context:
424
424
  }
425
425
}
426
426
 
 
427
void ContentsView::hideTouchSelectionController() {
 
428
  view()->HideTouchSelectionController();
 
429
}
 
430
 
427
431
blink::WebScreenInfo ContentsView::GetScreenInfo() const {
428
432
  QScreen* screen = client_->GetScreen();
429
433
  if (!screen) {
512
516
}
513
517
 
514
518
void ContentsView::TouchSelectionChanged(bool active,
515
 
                                         const gfx::RectF& bounds) const {
 
519
                                         const gfx::RectF& bounds,
 
520
                                         bool handle_drag_in_progress) const {
516
521
  gfx::RectF scaled_bounds =
517
522
      DpiUtils::ConvertChromiumPixelsToQt(bounds, GetScreen());
518
523
  client_->TouchSelectionChanged(
519
524
      active,
520
 
      ToQt(DpiUtils::ConvertChromiumPixelsToQt(bounds, GetScreen())));
 
525
      ToQt(DpiUtils::ConvertChromiumPixelsToQt(bounds, GetScreen())),
 
526
      handle_drag_in_progress);
521
527
}
522
528
 
523
529
oxide::InputMethodContext* ContentsView::GetInputMethodContext() const {