Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / tabs / tab_controller_target.h
bloba2b5d04b5842cce8b5fc59d230dfe08d6d4efc97
1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_
8 #include "chrome/browser/ui/tabs/tab_menu_model.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 @class TabController;
12 @protocol TabDraggingEventTarget;
14 // A protocol to be implemented by a TabController's target.
15 @protocol TabControllerTarget
16 - (void)selectTab:(id)sender;
17 - (void)closeTab:(id)sender;
19 // Dispatch context menu commands for the given tab controller.
20 - (void)commandDispatch:(TabStripModel::ContextMenuCommand)command
21 forController:(TabController*)controller;
22 // Returns YES if the specificed command should be enabled for the given
23 // controller.
24 - (BOOL)isCommandEnabled:(TabStripModel::ContextMenuCommand)command
25 forController:(TabController*)controller;
27 // Returns a context menu model for a given controller. Caller owns the result.
28 - (ui::SimpleMenuModel*)contextMenuModelForController:(TabController*)controller
29 menuDelegate:(ui::SimpleMenuModel::Delegate*)delegate;
31 // Returns a weak reference to the controller that manages dragging of tabs.
32 - (id<TabDraggingEventTarget>)dragController;
34 @end
36 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_