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

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

Issue 416903002: Revert 285142 "Open the WrenchMenu on mouseover when dragging a ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/chrome/chrome_tests.gypi ('k') | trunk/src/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,
88 int* event_flags); 87 int* event_flags);
89 88
90 // Whether or not Run blocks. 89 // Whether or not Run blocks.
91 bool IsBlockingRun() const { return blocking_run_; } 90 bool IsBlockingRun() const { return blocking_run_; }
92 91
93 // Whether or not drag operation is in progress. 92 // Whether or not drag operation is in progress.
94 bool drag_in_progress() const { return drag_in_progress_; } 93 bool drag_in_progress() const { return drag_in_progress_; }
95 94
96 // Whether the MenuController initiated the drag in progress. False if there 95 // Whether the MenuController initiated the drag in progress. False if there
97 // is no drag in progress. 96 // is no drag in progress.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // corresponds to whether or not the menu should close. 155 // corresponds to whether or not the menu should close.
157 void OnDragComplete(bool should_close); 156 void OnDragComplete(bool should_close);
158 157
159 // Update the submenu's selection based on the current mouse location 158 // Update the submenu's selection based on the current mouse location
160 void UpdateSubmenuSelection(SubmenuView* source); 159 void UpdateSubmenuSelection(SubmenuView* source);
161 160
162 // WidgetObserver overrides: 161 // WidgetObserver overrides:
163 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; 162 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
164 163
165 // Only used for testing. 164 // Only used for testing.
166 bool IsCancelAllTimerRunningForTest();
167
168 // Only used for testing.
169 static void TurnOffMenuSelectionHoldForTest(); 165 static void TurnOffMenuSelectionHoldForTest();
170 166
171 private: 167 private:
172 friend class internal::MenuEventDispatcher; 168 friend class internal::MenuEventDispatcher;
173 friend class internal::MenuMessagePumpDispatcher; 169 friend class internal::MenuMessagePumpDispatcher;
174 friend class internal::MenuRunnerImpl; 170 friend class internal::MenuRunnerImpl;
175 friend class MenuControllerTest; 171 friend class MenuControllerTest;
176 friend class MenuHostRootView; 172 friend class MenuHostRootView;
177 friend class MenuItemView; 173 friend class MenuItemView;
178 friend class SubmenuView; 174 friend class SubmenuView;
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 bool item_selected_by_touch_; 622 bool item_selected_by_touch_;
627 623
628 scoped_ptr<MenuMessageLoop> message_loop_; 624 scoped_ptr<MenuMessageLoop> message_loop_;
629 625
630 DISALLOW_COPY_AND_ASSIGN(MenuController); 626 DISALLOW_COPY_AND_ASSIGN(MenuController);
631 }; 627 };
632 628
633 } // namespace views 629 } // namespace views
634 630
635 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 631 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/chrome_tests.gypi ('k') | trunk/src/ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698