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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // Invoked when a mouse event occurs on |source|. | 87 // Invoked when a mouse event occurs on |source|. |
88 virtual void OnMouseEventInTab(views::View* source, | 88 virtual void OnMouseEventInTab(views::View* source, |
89 const ui::MouseEvent& event) = 0; | 89 const ui::MouseEvent& event) = 0; |
90 | 90 |
91 // Returns true if |tab| needs to be painted. If false is returned the tab is | 91 // Returns true if |tab| needs to be painted. If false is returned the tab is |
92 // not painted. If true is returned the tab should be painted and |clip| is | 92 // not painted. If true is returned the tab should be painted and |clip| is |
93 // set to the clip (if |clip| is empty means no clip). | 93 // set to the clip (if |clip| is empty means no clip). |
94 virtual bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) = 0; | 94 virtual bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) = 0; |
95 | 95 |
| 96 // Returns true if tab loading throbbers can be painted to a composited layer. |
| 97 // This can only be done when the TabController can guarantee that nothing |
| 98 // in the same window will redraw on top of the the favicon area of any tab. |
| 99 virtual bool CanPaintThrobberToLayer() const = 0; |
| 100 |
96 // Returns true if tabs painted in the rectangular light-bar style. | 101 // Returns true if tabs painted in the rectangular light-bar style. |
97 virtual bool IsImmersiveStyle() const = 0; | 102 virtual bool IsImmersiveStyle() const = 0; |
98 | 103 |
99 // Returns the resource ID for the image to use as the tab background. | 104 // Returns the resource ID for the image to use as the tab background. |
100 // |custom_image| is an outparam set to true if either the tab or the frame | 105 // |custom_image| is an outparam set to true if either the tab or the frame |
101 // background images have been customized; see implementation comments. | 106 // background images have been customized; see implementation comments. |
102 virtual int GetBackgroundResourceId(bool* custom_image) const = 0; | 107 virtual int GetBackgroundResourceId(bool* custom_image) const = 0; |
103 | 108 |
104 // Adds private information to the tab's accessibility state. | 109 // Adds private information to the tab's accessibility state. |
105 virtual void UpdateTabAccessibilityState(const Tab* tab, | 110 virtual void UpdateTabAccessibilityState(const Tab* tab, |
106 ui::AXViewState* state) = 0; | 111 ui::AXViewState* state) = 0; |
107 | 112 |
108 protected: | 113 protected: |
109 virtual ~TabController() {} | 114 virtual ~TabController() {} |
110 }; | 115 }; |
111 | 116 |
112 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ | 117 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ |
OLD | NEW |