Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: chrome/browser/ui/views/tabs/tab.h

Issue 11753021: Clean up the tab animation code (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // mini tab title change and pulsing. 228 // mini tab title change and pulsing.
229 double GetThrobValue(); 229 double GetThrobValue();
230 230
231 // Set the temporary offset for the favicon. This is used during the crash 231 // Set the temporary offset for the favicon. This is used during the crash
232 // animation. 232 // animation.
233 void SetFaviconHidingOffset(int offset); 233 void SetFaviconHidingOffset(int offset);
234 234
235 void DisplayCrashedFavicon(); 235 void DisplayCrashedFavicon();
236 void ResetCrashedFavicon(); 236 void ResetCrashedFavicon();
237 237
238 // Starts/Stops the crash animation.
239 void StartCrashAnimation(); 238 void StartCrashAnimation();
240 void StopCrashAnimation(); 239 void StopCrashAnimation();
241 240
241 void StartRecordingAnimation();
242 void StopRecordingAnimation();
243
242 // Returns true if the crash animation is currently running. 244 // Returns true if the crash animation is currently running.
243 bool IsPerformingCrashAnimation() const; 245 bool IsPerformingCrashAnimation() const;
244 246
245 // Schedules repaint task for icon. 247 // Schedules repaint task for icon.
246 void ScheduleIconPaint(); 248 void ScheduleIconPaint();
247 249
248 // Performs a one-time initialization of static resources such as tab images. 250 // Performs a one-time initialization of static resources such as tab images.
249 static void InitTabResources(); 251 static void InitTabResources();
250 252
251 // Returns the minimum possible size of a single unselected Tab, not 253 // Returns the minimum possible size of a single unselected Tab, not
(...skipping 28 matching lines...) Expand all
280 282
281 // The offset used to animate the favicon location. This is used when the tab 283 // The offset used to animate the favicon location. This is used when the tab
282 // crashes. 284 // crashes.
283 int favicon_hiding_offset_; 285 int favicon_hiding_offset_;
284 286
285 // The current index of the loading animation. 287 // The current index of the loading animation.
286 int loading_animation_frame_; 288 int loading_animation_frame_;
287 289
288 bool should_display_crashed_favicon_; 290 bool should_display_crashed_favicon_;
289 291
290 // Pulse animation. Non-null if StartPulse has been invoked. 292 // The tab and the icon can both be animating. The tab 'throbs' by changing
291 scoped_ptr<ui::ThrobAnimation> pulse_animation_; 293 // color. The icon can have one of several of animations like crashing,
292 294 // recording, projecting, etc.
293 // Crash animation. 295 scoped_ptr<ui::ThrobAnimation> tab_animation_;
294 scoped_ptr<FaviconCrashAnimation> crash_animation_; 296 scoped_ptr<ui::LinearAnimation> icon_animation_;
295
296 // Recording animation.
297 scoped_ptr<ui::ThrobAnimation> recording_animation_;
298 297
299 scoped_refptr<ui::AnimationContainer> animation_container_; 298 scoped_refptr<ui::AnimationContainer> animation_container_;
300 299
301 views::ImageButton* close_button_; 300 views::ImageButton* close_button_;
302 301
303 // Whether to disable throbber animations. Only true if this is an app tab 302 // Whether to disable throbber animations. Only true if this is an app tab
304 // renderer and a command line flag has been passed in to disable the 303 // renderer and a command line flag has been passed in to disable the
305 // animations. 304 // animations.
306 bool throbber_disabled_; 305 bool throbber_disabled_;
307 306
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 static int font_height_; 351 static int font_height_;
353 352
354 // As the majority of the tabs are inactive, and painting tabs is slowish, 353 // As the majority of the tabs are inactive, and painting tabs is slowish,
355 // we cache a handful of the inactive tab backgrounds here. 354 // we cache a handful of the inactive tab backgrounds here.
356 static ImageCache* image_cache_; 355 static ImageCache* image_cache_;
357 356
358 DISALLOW_COPY_AND_ASSIGN(Tab); 357 DISALLOW_COPY_AND_ASSIGN(Tab);
359 }; 358 };
360 359
361 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 360 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698