| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 269 |
| 270 // Gets the throb value for the tab. When a tab is not selected the | 270 // Gets the throb value for the tab. When a tab is not selected the |
| 271 // active background is drawn at |GetThrobValue()|%. This is used for hover, | 271 // active background is drawn at |GetThrobValue()|%. This is used for hover, |
| 272 // mini tab title change and pulsing. | 272 // mini tab title change and pulsing. |
| 273 double GetThrobValue(); | 273 double GetThrobValue(); |
| 274 | 274 |
| 275 // Set the temporary offset for the favicon. This is used during the crash | 275 // Set the temporary offset for the favicon. This is used during the crash |
| 276 // animation. | 276 // animation. |
| 277 void SetFaviconHidingOffset(int offset); | 277 void SetFaviconHidingOffset(int offset); |
| 278 | 278 |
| 279 void DisplayCrashedFavicon(); | 279 void set_should_display_crashed_favicon() { |
| 280 void ResetCrashedFavicon(); | 280 should_display_crashed_favicon_ = true; |
| 281 | 281 } |
| 282 void StopCrashAnimation(); | |
| 283 void StartCrashAnimation(); | |
| 284 | |
| 285 // Returns true if the crash animation is currently running. | |
| 286 bool IsPerformingCrashAnimation() const; | |
| 287 | 282 |
| 288 // Recalculates the correct |button_color_| and resets the title, media | 283 // Recalculates the correct |button_color_| and resets the title, media |
| 289 // indicator, and close button colors if necessary. This should be called any | 284 // indicator, and close button colors if necessary. This should be called any |
| 290 // time the theme or active state may have changed. | 285 // time the theme or active state may have changed. |
| 291 void OnButtonColorMaybeChanged(); | 286 void OnButtonColorMaybeChanged(); |
| 292 | 287 |
| 293 // Schedules repaint task for icon. | 288 // Schedules repaint task for icon. |
| 294 void ScheduleIconPaint(); | 289 void ScheduleIconPaint(); |
| 295 | 290 |
| 296 // Returns the rect that can be used for content inside the tab borders. | 291 // Returns the rect that can be used for content inside the tab borders. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 SkColor button_color_; | 399 SkColor button_color_; |
| 405 | 400 |
| 406 // 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, |
| 407 // we cache a handful of the inactive tab backgrounds here. | 402 // we cache a handful of the inactive tab backgrounds here. |
| 408 static ImageCache* image_cache_; | 403 static ImageCache* image_cache_; |
| 409 | 404 |
| 410 DISALLOW_COPY_AND_ASSIGN(Tab); | 405 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 411 }; | 406 }; |
| 412 | 407 |
| 413 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 408 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |