| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_WRENCH_MENU_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Used to dispatch commands from the Wrench menu. The custom items within the | 42 // Used to dispatch commands from the Wrench menu. The custom items within the |
| 43 // menu cannot be hooked up directly to First Responder because the window in | 43 // menu cannot be hooked up directly to First Responder because the window in |
| 44 // which the controls reside is not the BrowserWindowController, but a | 44 // which the controls reside is not the BrowserWindowController, but a |
| 45 // NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system. | 45 // NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system. |
| 46 - (IBAction)dispatchWrenchMenuCommand:(id)sender; | 46 - (IBAction)dispatchWrenchMenuCommand:(id)sender; |
| 47 | 47 |
| 48 // Returns the weak reference to the WrenchMenuModel. | 48 // Returns the weak reference to the WrenchMenuModel. |
| 49 - (WrenchMenuModel*)wrenchMenuModel; | 49 - (WrenchMenuModel*)wrenchMenuModel; |
| 50 | 50 |
| 51 // Inserts the update available notification menu item. |
| 52 - (void)insertUpdateAvailableItem; |
| 53 |
| 51 @end | 54 @end |
| 52 | 55 |
| 53 //////////////////////////////////////////////////////////////////////////////// | 56 //////////////////////////////////////////////////////////////////////////////// |
| 54 | 57 |
| 55 @interface WrenchMenuController (UnitTesting) | 58 @interface WrenchMenuController (UnitTesting) |
| 56 // |-dispatchWrenchMenuCommand:| calls this after it has determined the tag of | 59 // |-dispatchWrenchMenuCommand:| calls this after it has determined the tag of |
| 57 // the sender. The default implementation executes the command on the outermost | 60 // the sender. The default implementation executes the command on the outermost |
| 58 // run loop using |-performSelector...withDelay:|. This is not desirable in | 61 // run loop using |-performSelector...withDelay:|. This is not desirable in |
| 59 // unit tests because it's hard to test around run loops in a deterministic | 62 // unit tests because it's hard to test around run loops in a deterministic |
| 60 // manner. To avoid those headaches, tests should provide an alternative | 63 // manner. To avoid those headaches, tests should provide an alternative |
| 61 // implementation. | 64 // implementation. |
| 62 - (void)dispatchCommandInternal:(NSInteger)tag; | 65 - (void)dispatchCommandInternal:(NSInteger)tag; |
| 63 @end | 66 @end |
| 64 | 67 |
| 65 #endif // CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_ | 68 #endif // CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_ |
| OLD | NEW |