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
3// found in the LICENSE file.
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_
10#define CHROME_BROWSER_UI_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_
11
12#import <Cocoa/Cocoa.h>
13#import "chrome/browser/ui/cocoa/history_menu_bridge.h"
14
15@interface HistoryMenuCocoaController : NSObject {
16 @private
17  HistoryMenuBridge* bridge_;  // weak; owns us
18}
19
20- (id)initWithBridge:(HistoryMenuBridge*)bridge;
21
22// Called by any history menu item.
23- (IBAction)openHistoryMenuItem:(id)sender;
24
25@end  // HistoryMenuCocoaController
26
27@interface HistoryMenuCocoaController (ExposedForUnitTests)
28- (void)openURLForItem:(const HistoryMenuBridge::HistoryItem*)node;
29@end  // HistoryMenuCocoaController (ExposedForUnitTests)
30
31#endif  // CHROME_BROWSER_UI_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_
32