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

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

Issue 2790773002: Cleanup MenuRunner API (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/label.cc ('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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // being destroyed. 75 // being destroyed.
76 EXIT_DESTROYED 76 EXIT_DESTROYED
77 }; 77 };
78 78
79 // If a menu is currently active, this returns the controller for it. 79 // If a menu is currently active, this returns the controller for it.
80 static MenuController* GetActiveInstance(); 80 static MenuController* GetActiveInstance();
81 81
82 // Runs the menu at the specified location. If the menu was configured to 82 // Runs the menu at the specified location. If the menu was configured to
83 // block, the selected item is returned. If the menu does not block this 83 // block, the selected item is returned. If the menu does not block this
84 // returns NULL immediately. 84 // returns NULL immediately.
85 MenuItemView* Run(Widget* parent, 85 void Run(Widget* parent,
86 MenuButton* button, 86 MenuButton* button,
87 MenuItemView* root, 87 MenuItemView* root,
88 const gfx::Rect& bounds, 88 const gfx::Rect& bounds,
89 MenuAnchorPosition position, 89 MenuAnchorPosition position,
90 bool context_menu, 90 bool context_menu,
91 bool is_nested_drag, 91 bool is_nested_drag);
92 int* event_flags);
93 92
94 // Whether or not Run blocks. 93 // Whether or not Run blocks.
95 bool IsBlockingRun() const { return blocking_run_; } 94 bool IsBlockingRun() const { return blocking_run_; }
96 95
97 bool in_nested_run() const { return !menu_stack_.empty(); } 96 bool in_nested_run() const { return !menu_stack_.empty(); }
98 97
99 // Whether or not drag operation is in progress. 98 // Whether or not drag operation is in progress.
100 bool drag_in_progress() const { return drag_in_progress_; } 99 bool drag_in_progress() const { return drag_in_progress_; }
101 100
102 // Whether the MenuController initiated the drag in progress. False if there 101 // Whether the MenuController initiated the drag in progress. False if there
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 #if defined(USE_AURA) 682 #if defined(USE_AURA)
684 std::unique_ptr<MenuPreTargetHandler> menu_pre_target_handler_; 683 std::unique_ptr<MenuPreTargetHandler> menu_pre_target_handler_;
685 #endif 684 #endif
686 685
687 DISALLOW_COPY_AND_ASSIGN(MenuController); 686 DISALLOW_COPY_AND_ASSIGN(MenuController);
688 }; 687 };
689 688
690 } // namespace views 689 } // namespace views
691 690
692 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 691 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/label.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698