| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // mini tab title change and pulsing. | 226 // mini tab title change and pulsing. |
| 227 double GetThrobValue(); | 227 double GetThrobValue(); |
| 228 | 228 |
| 229 // Set the temporary offset for the favicon. This is used during the crash | 229 // Set the temporary offset for the favicon. This is used during the crash |
| 230 // animation. | 230 // animation. |
| 231 void SetFaviconHidingOffset(int offset); | 231 void SetFaviconHidingOffset(int offset); |
| 232 | 232 |
| 233 void DisplayCrashedFavicon(); | 233 void DisplayCrashedFavicon(); |
| 234 void ResetCrashedFavicon(); | 234 void ResetCrashedFavicon(); |
| 235 | 235 |
| 236 // Starts/Stops the crash animation. | |
| 237 void StartCrashAnimation(); | 236 void StartCrashAnimation(); |
| 238 void StopCrashAnimation(); | 237 void StopCrashAnimation(); |
| 239 | 238 |
| 239 void StartRecordingAnimation(); |
| 240 void StopRecordingAnimation(); |
| 241 |
| 240 // Returns true if the crash animation is currently running. | 242 // Returns true if the crash animation is currently running. |
| 241 bool IsPerformingCrashAnimation() const; | 243 bool IsPerformingCrashAnimation() const; |
| 242 | 244 |
| 243 // Schedules repaint task for icon. | 245 // Schedules repaint task for icon. |
| 244 void ScheduleIconPaint(); | 246 void ScheduleIconPaint(); |
| 245 | 247 |
| 246 // Performs a one-time initialization of static resources such as tab images. | 248 // Performs a one-time initialization of static resources such as tab images. |
| 247 static void InitTabResources(); | 249 static void InitTabResources(); |
| 248 | 250 |
| 249 // Returns the minimum possible size of a single unselected Tab, not | 251 // Returns the minimum possible size of a single unselected Tab, not |
| (...skipping 28 matching lines...) Expand all Loading... |
| 278 | 280 |
| 279 // The offset used to animate the favicon location. This is used when the tab | 281 // The offset used to animate the favicon location. This is used when the tab |
| 280 // crashes. | 282 // crashes. |
| 281 int favicon_hiding_offset_; | 283 int favicon_hiding_offset_; |
| 282 | 284 |
| 283 // The current index of the loading animation. | 285 // The current index of the loading animation. |
| 284 int loading_animation_frame_; | 286 int loading_animation_frame_; |
| 285 | 287 |
| 286 bool should_display_crashed_favicon_; | 288 bool should_display_crashed_favicon_; |
| 287 | 289 |
| 288 // Pulse animation. Non-null if StartPulse has been invoked. | 290 // The tab and the icon can both be animating. The tab 'throbs' by changing |
| 289 scoped_ptr<ui::ThrobAnimation> pulse_animation_; | 291 // color. The icon can have one of several of animations like crashing, |
| 290 | 292 // recording, projecting, etc. |
| 291 // Crash animation. | 293 scoped_ptr<ui::ThrobAnimation> tab_animation_; |
| 292 scoped_ptr<FaviconCrashAnimation> crash_animation_; | 294 scoped_ptr<ui::LinearAnimation> icon_animation_; |
| 293 | |
| 294 // Recording animation. | |
| 295 scoped_ptr<ui::ThrobAnimation> recording_animation_; | |
| 296 | 295 |
| 297 scoped_refptr<ui::AnimationContainer> animation_container_; | 296 scoped_refptr<ui::AnimationContainer> animation_container_; |
| 298 | 297 |
| 299 views::ImageButton* close_button_; | 298 views::ImageButton* close_button_; |
| 300 | 299 |
| 301 // Whether to disable throbber animations. Only true if this is an app tab | 300 // Whether to disable throbber animations. Only true if this is an app tab |
| 302 // renderer and a command line flag has been passed in to disable the | 301 // renderer and a command line flag has been passed in to disable the |
| 303 // animations. | 302 // animations. |
| 304 bool throbber_disabled_; | 303 bool throbber_disabled_; |
| 305 | 304 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 static int font_height_; | 347 static int font_height_; |
| 349 | 348 |
| 350 // As the majority of the tabs are inactive, and painting tabs is slowish, | 349 // As the majority of the tabs are inactive, and painting tabs is slowish, |
| 351 // we cache a handful of the inactive tab backgrounds here. | 350 // we cache a handful of the inactive tab backgrounds here. |
| 352 static ImageCache* image_cache_; | 351 static ImageCache* image_cache_; |
| 353 | 352 |
| 354 DISALLOW_COPY_AND_ASSIGN(Tab); | 353 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 355 }; | 354 }; |
| 356 | 355 |
| 357 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 356 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |