| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |