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

Unified Diff: ui/views/controls/menu/menu_host.cc

Issue 267593005: Refactor menu controller to isolate aura dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/controls/menu/menu_host.cc
diff --git a/ui/views/controls/menu/menu_host.cc b/ui/views/controls/menu/menu_host.cc
index 5e8593b98ab06b57bc2e780541d1fe18b8f904b4..9f71ce6ece4497480b76aa62ebcdadda3785d0a7 100644
--- a/ui/views/controls/menu/menu_host.cc
+++ b/ui/views/controls/menu/menu_host.cc
@@ -54,8 +54,10 @@ void MenuHost::InitMenuHost(Widget* parent,
params.bounds = bounds;
Init(params);
+#if defined(USE_AURA)
if (bubble_border)
SetShadowType(GetNativeView(), wm::SHADOW_TYPE_NONE);
+#endif
SetContentsView(contents_view);
if (bubble_border || rounded_border)
@@ -73,9 +75,11 @@ void MenuHost::ShowMenuHost(bool do_capture) {
base::AutoReset<bool> reseter(&ignore_capture_lost_, true);
ShowInactive();
if (do_capture) {
+#if defined(USE_AURA)
// Cancel existing touches, so we don't miss some touch release/cancel
// events due to the menu taking capture.
ui::GestureRecognizer::Get()->TransferEventsTo(GetNativeWindow(), NULL);
+#endif
native_widget_private()->SetCapture();
}
}

Powered by Google App Engine
This is Rietveld 408576698