| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_VIEWS_TABS_TAB_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/views/tabs/tab_strip_types.h" | 8 #include "chrome/browser/ui/views/tabs/tab_strip_types.h" |
| 9 | 9 |
| 10 class Tab; | 10 class Tab; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // Toggles whether |tab| is selected. | 38 // Toggles whether |tab| is selected. |
| 39 virtual void ToggleSelected(Tab* tab) = 0; | 39 virtual void ToggleSelected(Tab* tab) = 0; |
| 40 | 40 |
| 41 // Adds the selection from the anchor to |tab|. | 41 // Adds the selection from the anchor to |tab|. |
| 42 virtual void AddSelectionFromAnchorTo(Tab* tab) = 0; | 42 virtual void AddSelectionFromAnchorTo(Tab* tab) = 0; |
| 43 | 43 |
| 44 // Closes the tab. | 44 // Closes the tab. |
| 45 virtual void CloseTab(Tab* tab, CloseTabSource source) = 0; | 45 virtual void CloseTab(Tab* tab, CloseTabSource source) = 0; |
| 46 | 46 |
| 47 // Shows a context menu for the tab at the specified point in screen coords. | 47 // Shows a context menu for the tab at the specified point in screen coords. |
| 48 virtual void ShowContextMenuForTab(Tab* tab, const gfx::Point& p) = 0; | 48 virtual void ShowContextMenuForTab(Tab* tab, |
| 49 const gfx::Point& p, |
| 50 ui::MenuSourceType source_type) = 0; |
| 49 | 51 |
| 50 // Returns true if |tab| is the active tab. The active tab is the one whose | 52 // Returns true if |tab| is the active tab. The active tab is the one whose |
| 51 // content is shown in the browser. | 53 // content is shown in the browser. |
| 52 virtual bool IsActiveTab(const Tab* tab) const = 0; | 54 virtual bool IsActiveTab(const Tab* tab) const = 0; |
| 53 | 55 |
| 54 // Returns true if the specified Tab is selected. | 56 // Returns true if the specified Tab is selected. |
| 55 virtual bool IsTabSelected(const Tab* tab) const = 0; | 57 virtual bool IsTabSelected(const Tab* tab) const = 0; |
| 56 | 58 |
| 57 // Returns true if the specified Tab is pinned. | 59 // Returns true if the specified Tab is pinned. |
| 58 virtual bool IsTabPinned(const Tab* tab) const = 0; | 60 virtual bool IsTabPinned(const Tab* tab) const = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 85 virtual bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) = 0; | 87 virtual bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) = 0; |
| 86 | 88 |
| 87 // Returns true if tabs painted in the rectangular light-bar style. | 89 // Returns true if tabs painted in the rectangular light-bar style. |
| 88 virtual bool IsImmersiveStyle() const = 0; | 90 virtual bool IsImmersiveStyle() const = 0; |
| 89 | 91 |
| 90 protected: | 92 protected: |
| 91 virtual ~TabController() {} | 93 virtual ~TabController() {} |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ | 96 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ |
| OLD | NEW |