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

Unified Diff: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm

Issue 7712008: Refactor and clean up code now that chrome::testing::NSRunLoopRunAllPending() exists. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update gtest_exclude Created 9 years, 4 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
Index: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
index 68f0754ceccd4886de843625b4c153a144f7c810..54b134d68a42ad056847695cb975ec8093169a78 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
@@ -167,17 +167,14 @@ class ZoomLevelObserver : public NotificationObserver {
// The custom views within the Wrench menu are abnormal and keep the menu
// open after a target-action. Close the menu manually.
[menu_ cancelTracking];
- [self dispatchCommandInternal:tag];
- }
-}
-- (void)dispatchCommandInternal:(NSInteger)tag {
- // Executing certain commands from the nested run loop of the menu can lead
- // to wonky behavior (e.g. http://crbug.com/49716). To avoid this, schedule
- // the dispatch on the outermost run loop.
- [self performSelector:@selector(performCommandDispatch:)
- withObject:[NSNumber numberWithInt:tag]
- afterDelay:0.0];
+ // Executing certain commands from the nested run loop of the menu can lead
+ // to wonky behavior (e.g. http://crbug.com/49716). To avoid this, schedule
+ // the dispatch on the outermost run loop.
+ [self performSelector:@selector(performCommandDispatch:)
+ withObject:[NSNumber numberWithInt:tag]
+ afterDelay:0.0];
+ }
}
// Used to perform the actual dispatch on the outermost runloop.

Powered by Google App Engine
This is Rietveld 408576698