| 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_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // Sets the container all animations run from. | 75 // Sets the container all animations run from. |
| 76 void SetAnimationContainer(gfx::AnimationContainer* container); | 76 void SetAnimationContainer(gfx::AnimationContainer* container); |
| 77 | 77 |
| 78 // Returns true if this tab is the active tab. | 78 // Returns true if this tab is the active tab. |
| 79 bool IsActive() const; | 79 bool IsActive() const; |
| 80 | 80 |
| 81 // Notifies the MediaIndicatorButton that the active state of this tab has | 81 // Notifies the MediaIndicatorButton that the active state of this tab has |
| 82 // changed. | 82 // changed. |
| 83 void ActiveStateChanged(); | 83 void ActiveStateChanged(); |
| 84 | 84 |
| 85 // Called when the media indicator has changed states. |
| 86 void MediaStateChanged(); |
| 87 |
| 85 // Returns true if the tab is selected. | 88 // Returns true if the tab is selected. |
| 86 bool IsSelected() const; | 89 bool IsSelected() const; |
| 87 | 90 |
| 88 // Sets the data this tabs displays. Invokes DataChanged. Should only be | 91 // Sets the data this tabs displays. Invokes DataChanged. Should only be |
| 89 // called after Tab is added to widget hierarchy. | 92 // called after Tab is added to widget hierarchy. |
| 90 void SetData(const TabRendererData& data); | 93 void SetData(const TabRendererData& data); |
| 91 const TabRendererData& data() const { return data_; } | 94 const TabRendererData& data() const { return data_; } |
| 92 | 95 |
| 93 // Sets the network state. | 96 // Sets the network state. |
| 94 void UpdateLoadingAnimation(TabRendererData::NetworkState state); | 97 void UpdateLoadingAnimation(TabRendererData::NetworkState state); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 SkColor button_color_; | 399 SkColor button_color_; |
| 397 | 400 |
| 398 // As the majority of the tabs are inactive, and painting tabs is slowish, | 401 // As the majority of the tabs are inactive, and painting tabs is slowish, |
| 399 // we cache a handful of the inactive tab backgrounds here. | 402 // we cache a handful of the inactive tab backgrounds here. |
| 400 static ImageCache* image_cache_; | 403 static ImageCache* image_cache_; |
| 401 | 404 |
| 402 DISALLOW_COPY_AND_ASSIGN(Tab); | 405 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 403 }; | 406 }; |
| 404 | 407 |
| 405 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 408 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |