Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: ui/views/touchui/touch_selection_controller_impl.cc

Issue 177173007: Change type of touch selection handles to POPUP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased after r263384 Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/touchui/touch_selection_controller_impl.cc
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc
index e5a6b7f9097014201ca16cfca8f4dcb29cf0321d..1e8c2f524cf79d4fe65bbb6b50db5811446fa95a 100644
--- a/ui/views/touchui/touch_selection_controller_impl.cc
+++ b/ui/views/touchui/touch_selection_controller_impl.cc
@@ -72,11 +72,11 @@ views::Widget* CreateTouchSelectionPopupWidget(
gfx::NativeView context,
views::WidgetDelegate* widget_delegate) {
views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_TOOLTIP);
+ views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
params.can_activate = false;
params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.context = context;
+ params.parent = context;
params.delegate = widget_delegate;
widget->Init(params);
SetShadowType(widget->GetNativeView(), wm::SHADOW_TYPE_NONE);
@@ -156,7 +156,6 @@ class TouchSelectionControllerImpl::EditingHandleView
draw_invisible_(false) {
widget_.reset(CreateTouchSelectionPopupWidget(context, this));
widget_->SetContentsView(this);
- widget_->SetAlwaysOnTop(true);
aura::Window* window = widget_->GetNativeWindow();
window->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
@@ -582,6 +581,10 @@ void TouchSelectionControllerImpl::HideContextMenu() {
context_menu_timer_.Stop();
}
+gfx::NativeView TouchSelectionControllerImpl::GetCursorHandleNativeView() {
+ return cursor_handle_->GetWidget()->GetNativeView();
+}
+
gfx::Point TouchSelectionControllerImpl::GetSelectionHandle1Position() {
return selection_handle_1_->GetScreenPosition();
}
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl.h ('k') | ui/views/touchui/touch_selection_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698