| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GTK_TABS_TAB_RENDERER_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ | 6 #define CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 int loading_animation_frame_count; | 54 int loading_animation_frame_count; |
| 55 int waiting_animation_frame_count; | 55 int waiting_animation_frame_count; |
| 56 int waiting_to_loading_frame_count_ratio; | 56 int waiting_to_loading_frame_count_ratio; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 explicit LoadingAnimation(ThemeProvider* theme_provider); | 59 explicit LoadingAnimation(ThemeProvider* theme_provider); |
| 60 | 60 |
| 61 // Used in unit tests to inject specific data. | 61 // Used in unit tests to inject specific data. |
| 62 explicit LoadingAnimation(const LoadingAnimation::Data& data); | 62 explicit LoadingAnimation(const LoadingAnimation::Data& data); |
| 63 | 63 |
| 64 virtual ~LoadingAnimation(); |
| 65 |
| 64 // Advance the loading animation to the next frame, or hide the animation if | 66 // Advance the loading animation to the next frame, or hide the animation if |
| 65 // the tab isn't loading. Returns |true| if the icon area needs to be | 67 // the tab isn't loading. Returns |true| if the icon area needs to be |
| 66 // repainted. | 68 // repainted. |
| 67 bool ValidateLoadingAnimation(AnimationState animation_state); | 69 bool ValidateLoadingAnimation(AnimationState animation_state); |
| 68 | 70 |
| 69 AnimationState animation_state() const { return animation_state_; } | 71 AnimationState animation_state() const { return animation_state_; } |
| 70 int animation_frame() const { return animation_frame_; } | 72 int animation_frame() const { return animation_frame_; } |
| 71 | 73 |
| 72 const SkBitmap* waiting_animation_frames() const { | 74 const SkBitmap* waiting_animation_frames() const { |
| 73 return data_->waiting_animation_frames; | 75 return data_->waiting_animation_frames; |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 // The current color of the close button. | 443 // The current color of the close button. |
| 442 SkColor close_button_color_; | 444 SkColor close_button_color_; |
| 443 | 445 |
| 444 // Used to listen for theme change notifications. | 446 // Used to listen for theme change notifications. |
| 445 NotificationRegistrar registrar_; | 447 NotificationRegistrar registrar_; |
| 446 | 448 |
| 447 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); | 449 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); |
| 448 }; | 450 }; |
| 449 | 451 |
| 450 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ | 452 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ |
| OLD | NEW |