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

Side by Side Diff: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system. 54 // NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system.
55 - (IBAction)dispatchWrenchMenuCommand:(id)sender; 55 - (IBAction)dispatchWrenchMenuCommand:(id)sender;
56 56
57 // Returns the weak reference to the WrenchMenuModel. 57 // Returns the weak reference to the WrenchMenuModel.
58 - (WrenchMenuModel*)wrenchMenuModel; 58 - (WrenchMenuModel*)wrenchMenuModel;
59 59
60 @end 60 @end
61 61
62 //////////////////////////////////////////////////////////////////////////////// 62 ////////////////////////////////////////////////////////////////////////////////
63 63
64 @interface WrenchMenuController (UnitTesting)
65 // |-dispatchWrenchMenuCommand:| calls this after it has determined the tag of
66 // the sender. The default implementation executes the command on the outermost
67 // run loop using |-performSelector...withDelay:|. This is not desirable in
68 // unit tests because it's hard to test around run loops in a deterministic
69 // manner. To avoid those headaches, tests should provide an alternative
70 // implementation.
71 - (void)dispatchCommandInternal:(NSInteger)tag;
72 @end
73
74 #endif // CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ 64 #endif // CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698