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

Unified Diff: ui/base/cocoa/menu_controller.h

Issue 2863883002: Tracing for NSMenu timelines
Patch Set: big CL with more trace points Created 3 years, 7 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 | « no previous file | ui/base/cocoa/menu_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/menu_controller.h
diff --git a/ui/base/cocoa/menu_controller.h b/ui/base/cocoa/menu_controller.h
index 7e8e4acfcd8c7d27643ed0d1616f4472a10350d2..71ce43b4cd53c413c100cd93b50202a31396c730 100644
--- a/ui/base/cocoa/menu_controller.h
+++ b/ui/base/cocoa/menu_controller.h
@@ -29,6 +29,7 @@ UI_BASE_EXPORT
@protected
ui::MenuModel* model_; // weak
base::scoped_nsobject<NSMenu> menu_;
+ BOOL suppressNextItemSelected_; // Set by -processItemSelectedEarly:.
BOOL useWithPopUpButtonCell_; // If YES, 0th item is blank
BOOL isMenuOpen_;
}
@@ -57,6 +58,16 @@ UI_BASE_EXPORT
// Programmatically close the constructed menu.
- (void)cancel;
+// Called when the user chooses a particular menu item. |sender| is the menu
+// item chosen.
+- (void)itemSelected:(id)sender;
+
+// Sent when the menu item is clicked. A subclass can invoke itemSelected: and
+// return YES to suppress the action processing that occurs 300ms later, after
+// the native menu animations have completed. Consumers should not assume that
+// this method will be invoked.
+- (BOOL)processItemSelectedEarly:(id)sender;
+
// Access to the constructed menu if the complex initializer was used. If the
// default initializer was used, then this will create the menu on first call.
- (NSMenu*)menu;
« no previous file with comments | « no previous file | ui/base/cocoa/menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698