summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/history_menu_cocoa_controller.h
blob: efe764548f01cb1a35cad3627bed3a7d919fc9a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Controller (MVC) for the history menu. All history menu item commands get
// directed here. This class only responds to menu events, but the actual
// creation and maintenance of the menu happens in the Bridge.

#ifndef CHROME_BROWSER_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_
#define CHROME_BROWSER_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_

#import <Cocoa/Cocoa.h>
#import "chrome/browser/cocoa/history_menu_bridge.h"

@interface HistoryMenuCocoaController : NSObject {
 @private
  HistoryMenuBridge* bridge_;  // weak; owns us
}

- (id)initWithBridge:(HistoryMenuBridge*)bridge;

// Called by any history menu item.
- (IBAction)openHistoryMenuItem:(id)sender;

@end  // HistoryMenuCocoaController

@interface HistoryMenuCocoaController (ExposedForUnitTests)
- (void)openURLForItem:(const HistoryMenuBridge::HistoryItem*)node;
@end  // HistoryMenuCocoaController (ExposedForUnitTests)

#endif  // CHROME_BROWSER_COCOA_HISTORY_MENU_COCOA_CONTROLLER_H_