| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/tabs/tab_strip_model.h" | 9 #include "chrome/browser/tabs/tab_strip_model.h" |
| 10 #include "chrome/browser/ui/tabs/tab_menu_model.h" | 10 #include "chrome/browser/ui/tabs/tab_menu_model.h" |
| 11 | 11 |
| 12 @class TabController; | 12 @class TabController; |
| 13 @protocol TabDraggingEventTarget; | 13 @protocol TabDraggingEventTarget; |
| 14 | 14 |
| 15 // A protocol to be implemented by a TabController's target. | 15 // A protocol to be implemented by a TabController's target. |
| 16 @protocol TabControllerTarget | 16 @protocol TabControllerTarget |
| 17 - (void)selectTab:(id)sender; | 17 - (void)selectTab:(id)sender; |
| 18 - (void)closeTab:(id)sender; | 18 - (void)closeTab:(id)sender; |
| 19 - (void)closeOtherTabs:(id)sender; | |
| 20 | 19 |
| 21 // Dispatch context menu commands for the given tab controller. | 20 // Dispatch context menu commands for the given tab controller. |
| 22 - (void)commandDispatch:(TabStripModel::ContextMenuCommand)command | 21 - (void)commandDispatch:(TabStripModel::ContextMenuCommand)command |
| 23 forController:(TabController*)controller; | 22 forController:(TabController*)controller; |
| 24 // Returns YES if the specificed command should be enabled for the given | 23 // Returns YES if the specificed command should be enabled for the given |
| 25 // controller. | 24 // controller. |
| 26 - (BOOL)isCommandEnabled:(TabStripModel::ContextMenuCommand)command | 25 - (BOOL)isCommandEnabled:(TabStripModel::ContextMenuCommand)command |
| 27 forController:(TabController*)controller; | 26 forController:(TabController*)controller; |
| 28 | 27 |
| 29 // Returns a context menu model for a given controller. Caller owns the result. | 28 // Returns a context menu model for a given controller. Caller owns the result. |
| 30 - (ui::SimpleMenuModel*)contextMenuModelForController:(TabController*)controller | 29 - (ui::SimpleMenuModel*)contextMenuModelForController:(TabController*)controller |
| 31 menuDelegate:(ui::SimpleMenuModel::Delegate*)delegate; | 30 menuDelegate:(ui::SimpleMenuModel::Delegate*)delegate; |
| 32 | 31 |
| 33 // Returns a weak reference to the controller that manages dragging of tabs. | 32 // Returns a weak reference to the controller that manages dragging of tabs. |
| 34 - (id<TabDraggingEventTarget>)dragController; | 33 - (id<TabDraggingEventTarget>)dragController; |
| 35 | 34 |
| 36 @end | 35 @end |
| 37 | 36 |
| 38 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_ | 37 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_TARGET_H_ |
| OLD | NEW |