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