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

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

Issue 2620203004: MenuRunner: Add comment to specify blocking behavior on MacViews. (Closed)
Patch Set: Address review. Created 3 years, 11 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 | « no previous file | no next file » | 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_RUNNER_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Indicates RunMenuAt is returning because the MenuRunner was deleted. 101 // Indicates RunMenuAt is returning because the MenuRunner was deleted.
102 MENU_DELETED, 102 MENU_DELETED,
103 103
104 // Indicates RunMenuAt returned and MenuRunner was not deleted. 104 // Indicates RunMenuAt returned and MenuRunner was not deleted.
105 NORMAL_EXIT 105 NORMAL_EXIT
106 }; 106 };
107 107
108 // Creates a new MenuRunner, which may use a native menu if available. 108 // Creates a new MenuRunner, which may use a native menu if available.
109 // |run_types| is a bitmask of RunTypes. If provided, 109 // |run_types| is a bitmask of RunTypes. If provided,
110 // |on_menu_closed_callback| is invoked when the menu is closed. 110 // |on_menu_closed_callback| is invoked when the menu is closed.
111 // Note that with a native menu (e.g. on Mac), the ASYNC flag in |run_types|
112 // may be ignored. See http://crbug.com/682544.
111 MenuRunner(ui::MenuModel* menu_model, 113 MenuRunner(ui::MenuModel* menu_model,
112 int32_t run_types, 114 int32_t run_types,
113 const base::Closure& on_menu_closed_callback = base::Closure()); 115 const base::Closure& on_menu_closed_callback = base::Closure());
114 116
115 // Creates a runner for a custom-created toolkit-views menu. 117 // Creates a runner for a custom-created toolkit-views menu.
116 MenuRunner(MenuItemView* menu, int32_t run_types); 118 MenuRunner(MenuItemView* menu, int32_t run_types);
117 ~MenuRunner(); 119 ~MenuRunner();
118 120
119 // Runs the menu. If this returns MENU_DELETED the method is returning 121 // Runs the menu. If this returns MENU_DELETED the method is returning
120 // because the MenuRunner was deleted. 122 // because the MenuRunner was deleted.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 175
174 protected: 176 protected:
175 DisplayChangeListener() {} 177 DisplayChangeListener() {}
176 }; 178 };
177 179
178 } // namespace internal 180 } // namespace internal
179 181
180 } // namespace views 182 } // namespace views
181 183
182 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 184 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698