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

Unified Diff: ui/views/controls/menu/menu_controller.h

Issue 547303003: Keep reference view pressed while extension actions have a popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: VIEWS_EXPORT fix Created 6 years, 3 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
« no previous file with comments | « ui/views/controls/button/menu_button_unittest.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_controller.h
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index dd1485dc858cc58d30242ec507a70bf6c5fae735..a0201447d8a3a1bc5571794db0d1446075d6a7d2 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -12,11 +12,13 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/timer/timer.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/platform/platform_event_dispatcher.h"
+#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/menu/menu_config.h"
#include "ui/views/controls/menu/menu_delegate.h"
#include "ui/views/widget/widget_observer.h"
@@ -549,7 +551,8 @@ class VIEWS_EXPORT MenuController : public WidgetObserver {
// If not empty, it means we're nested. When Run is invoked from within
// Run, the current state (state_) is pushed onto menu_stack_. This allows
// MenuController to restore the state when the nested run returns.
- std::list<State> menu_stack_;
+ typedef std::pair<State, linked_ptr<MenuButton::PressedLock> > NestedState;
+ std::list<NestedState> menu_stack_;
// As the mouse moves around submenus are not opened immediately. Instead
// they open after this timer fires.
@@ -596,7 +599,8 @@ class VIEWS_EXPORT MenuController : public WidgetObserver {
// underway.
scoped_ptr<MenuScrollTask> scroll_task_;
- MenuButton* menu_button_;
+ // The lock to keep the menu button pressed while a menu is visible.
+ scoped_ptr<MenuButton::PressedLock> pressed_lock_;
// ViewStorage id used to store the view mouse drag events are forwarded to.
// See UpdateActiveMouseView() for details.
« no previous file with comments | « ui/views/controls/button/menu_button_unittest.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698