| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_TABS_TAB_RENDERER_H__ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ |
| 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ | 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ |
| 7 | 7 |
| 8 #include "base/gfx/point.h" | 8 #include "base/gfx/point.h" |
| 9 #include "chrome/common/animation.h" | 9 #include "chrome/common/animation.h" |
| 10 #include "chrome/common/slide_animation.h" | 10 #include "chrome/common/slide_animation.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 enum AnimationState { | 30 enum AnimationState { |
| 31 ANIMATION_NONE, | 31 ANIMATION_NONE, |
| 32 ANIMATION_WAITING, | 32 ANIMATION_WAITING, |
| 33 ANIMATION_LOADING | 33 ANIMATION_LOADING |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 TabRenderer(); | 36 TabRenderer(); |
| 37 virtual ~TabRenderer(); | 37 virtual ~TabRenderer(); |
| 38 | 38 |
| 39 // Updates the data the Tab uses to render itself from the specified | 39 // Updates the data the Tab uses to render itself from the specified |
| 40 // TabContents. | 40 // TabContents. If only the loading state was updated, the loading_only flag |
| 41 void UpdateData(TabContents* contents); | 41 // should be specified. If other things change, set this flag to false to |
| 42 // update everything. |
| 43 void UpdateData(TabContents* contents, bool loading_only); |
| 42 | 44 |
| 43 // Updates the display to reflect the contents of this TabRenderer's model. | 45 // Updates the display to reflect the contents of this TabRenderer's model. |
| 44 void UpdateFromModel(); | 46 void UpdateFromModel(); |
| 45 | 47 |
| 46 // Returns true if the Tab is selected, false otherwise. | 48 // Returns true if the Tab is selected, false otherwise. |
| 47 virtual bool IsSelected() const; | 49 virtual bool IsSelected() const; |
| 48 | 50 |
| 49 // Advance the Loading Animation to the next frame, or hide the animation if | 51 // Advance the Loading Animation to the next frame, or hide the animation if |
| 50 // the tab isn't loading. | 52 // the tab isn't loading. |
| 51 void ValidateLoadingAnimation(AnimationState animation_state); | 53 void ValidateLoadingAnimation(AnimationState animation_state); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 189 |
| 188 bool should_display_crashed_favicon_; | 190 bool should_display_crashed_favicon_; |
| 189 | 191 |
| 190 static void InitClass(); | 192 static void InitClass(); |
| 191 static bool initialized_; | 193 static bool initialized_; |
| 192 | 194 |
| 193 DISALLOW_EVIL_CONSTRUCTORS(TabRenderer); | 195 DISALLOW_EVIL_CONSTRUCTORS(TabRenderer); |
| 194 }; | 196 }; |
| 195 | 197 |
| 196 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ | 198 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ |
| OLD | NEW |