| 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 // Controller (MVC) for the history menu. All history menu item commands get | |
| 6 // directed here. This class only responds to menu events, but the actual | |
| 7 // creation and maintenance of the menu happens in the Bridge. | |
| 8 | |
| 9 #ifndef CHROME_BROWSER_UI_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_ |
| 10 #define CHROME_BROWSER_UI_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_ |
| 11 | 7 |
| 12 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 13 #import "chrome/browser/ui/cocoa/history_menu_bridge.h" | 9 #import "chrome/browser/ui/cocoa/history_menu_bridge.h" |
| 14 | 10 |
| 11 // Controller (MVC) for the history menu. All history menu item commands get |
| 12 // directed here. This class only responds to menu events, but the actual |
| 13 // creation and maintenance of the menu happens in the Bridge. |
| 15 @interface HistoryMenuCocoaController : NSObject { | 14 @interface HistoryMenuCocoaController : NSObject { |
| 16 @private | 15 @private |
| 17 HistoryMenuBridge* bridge_; // weak; owns us | 16 HistoryMenuBridge* bridge_; // weak; owns us |
| 18 } | 17 } |
| 19 | 18 |
| 20 - (id)initWithBridge:(HistoryMenuBridge*)bridge; | 19 - (id)initWithBridge:(HistoryMenuBridge*)bridge; |
| 21 | 20 |
| 22 // Called by any history menu item. | 21 // Called by any history menu item. |
| 23 - (IBAction)openHistoryMenuItem:(id)sender; | 22 - (IBAction)openHistoryMenuItem:(id)sender; |
| 24 | 23 |
| 25 @end // HistoryMenuCocoaController | 24 @end // HistoryMenuCocoaController |
| 26 | 25 |
| 27 @interface HistoryMenuCocoaController (ExposedForUnitTests) | 26 @interface HistoryMenuCocoaController (ExposedForUnitTests) |
| 28 - (void)openURLForItem:(const HistoryMenuBridge::HistoryItem*)node; | 27 - (void)openURLForItem:(const HistoryMenuBridge::HistoryItem*)node; |
| 29 @end // HistoryMenuCocoaController (ExposedForUnitTests) | 28 @end // HistoryMenuCocoaController (ExposedForUnitTests) |
| 30 | 29 |
| 31 #endif // CHROME_BROWSER_UI_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_ | 30 #endif // CHROME_BROWSER_UI_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_ |
| OLD | NEW |