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

Side by Side Diff: ui/views/controls/menu/menu_controller.h

Issue 399143004: Open the WrenchMenu on mouseover when dragging a browser action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win/Test Fix Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <list> 10 #include <list>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 // Runs the menu at the specified location. If the menu was configured to 78 // Runs the menu at the specified location. If the menu was configured to
79 // block, the selected item is returned. If the menu does not block this 79 // block, the selected item is returned. If the menu does not block this
80 // returns NULL immediately. 80 // returns NULL immediately.
81 MenuItemView* Run(Widget* parent, 81 MenuItemView* Run(Widget* parent,
82 MenuButton* button, 82 MenuButton* button,
83 MenuItemView* root, 83 MenuItemView* root,
84 const gfx::Rect& bounds, 84 const gfx::Rect& bounds,
85 MenuAnchorPosition position, 85 MenuAnchorPosition position,
86 bool context_menu, 86 bool context_menu,
87 bool is_nested_drag,
87 int* event_flags); 88 int* event_flags);
88 89
89 // Whether or not Run blocks. 90 // Whether or not Run blocks.
90 bool IsBlockingRun() const { return blocking_run_; } 91 bool IsBlockingRun() const { return blocking_run_; }
91 92
92 // Whether or not drag operation is in progress. 93 // Whether or not drag operation is in progress.
93 bool drag_in_progress() const { return drag_in_progress_; } 94 bool drag_in_progress() const { return drag_in_progress_; }
94 95
95 // Whether the MenuController initiated the drag in progress. False if there 96 // Whether the MenuController initiated the drag in progress. False if there
96 // is no drag in progress. 97 // is no drag in progress.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // corresponds to whether or not the menu should close. 156 // corresponds to whether or not the menu should close.
156 void OnDragComplete(bool should_close); 157 void OnDragComplete(bool should_close);
157 158
158 // Update the submenu's selection based on the current mouse location 159 // Update the submenu's selection based on the current mouse location
159 void UpdateSubmenuSelection(SubmenuView* source); 160 void UpdateSubmenuSelection(SubmenuView* source);
160 161
161 // WidgetObserver overrides: 162 // WidgetObserver overrides:
162 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; 163 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
163 164
164 // Only used for testing. 165 // Only used for testing.
166 bool IsCancelAllTimerRunningForTest();
167
168 // Only used for testing.
165 static void TurnOffMenuSelectionHoldForTest(); 169 static void TurnOffMenuSelectionHoldForTest();
166 170
167 private: 171 private:
168 friend class internal::MenuEventDispatcher; 172 friend class internal::MenuEventDispatcher;
169 friend class internal::MenuMessagePumpDispatcher; 173 friend class internal::MenuMessagePumpDispatcher;
170 friend class internal::MenuRunnerImpl; 174 friend class internal::MenuRunnerImpl;
171 friend class MenuControllerTest; 175 friend class MenuControllerTest;
172 friend class MenuHostRootView; 176 friend class MenuHostRootView;
173 friend class MenuItemView; 177 friend class MenuItemView;
174 friend class SubmenuView; 178 friend class SubmenuView;
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 bool item_selected_by_touch_; 626 bool item_selected_by_touch_;
623 627
624 scoped_ptr<MenuMessageLoop> message_loop_; 628 scoped_ptr<MenuMessageLoop> message_loop_;
625 629
626 DISALLOW_COPY_AND_ASSIGN(MenuController); 630 DISALLOW_COPY_AND_ASSIGN(MenuController);
627 }; 631 };
628 632
629 } // namespace views 633 } // namespace views
630 634
631 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 635 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698