| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GTK_TABS_TAB_RENDERER_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ | 6 #define CHROME_BROWSER_UI_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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 int animation_frame() const { return animation_frame_; } | 74 int animation_frame() const { return animation_frame_; } |
| 75 | 75 |
| 76 const SkBitmap* waiting_animation_frames() const { | 76 const SkBitmap* waiting_animation_frames() const { |
| 77 return data_->waiting_animation_frames; | 77 return data_->waiting_animation_frames; |
| 78 } | 78 } |
| 79 const SkBitmap* loading_animation_frames() const { | 79 const SkBitmap* loading_animation_frames() const { |
| 80 return data_->loading_animation_frames; | 80 return data_->loading_animation_frames; |
| 81 } | 81 } |
| 82 | 82 |
| 83 // Provide NotificationObserver implementation. | 83 // Provide NotificationObserver implementation. |
| 84 virtual void Observe(NotificationType type, | 84 virtual void Observe(int type, |
| 85 const NotificationSource& source, | 85 const NotificationSource& source, |
| 86 const NotificationDetails& details); | 86 const NotificationDetails& details); |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 scoped_ptr<Data> data_; | 89 scoped_ptr<Data> data_; |
| 90 | 90 |
| 91 // Used to listen for theme change notifications. | 91 // Used to listen for theme change notifications. |
| 92 NotificationRegistrar registrar_; | 92 NotificationRegistrar registrar_; |
| 93 | 93 |
| 94 // Gives us our throbber images. | 94 // Gives us our throbber images. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // paint with the windowing system. | 157 // paint with the windowing system. |
| 158 virtual void SchedulePaint(); | 158 virtual void SchedulePaint(); |
| 159 | 159 |
| 160 // Notifies the Tab that the close button has been clicked. | 160 // Notifies the Tab that the close button has been clicked. |
| 161 virtual void CloseButtonClicked(); | 161 virtual void CloseButtonClicked(); |
| 162 | 162 |
| 163 // Sets the bounds of the tab. | 163 // Sets the bounds of the tab. |
| 164 virtual void SetBounds(const gfx::Rect& bounds); | 164 virtual void SetBounds(const gfx::Rect& bounds); |
| 165 | 165 |
| 166 // Provide NotificationObserver implementation. | 166 // Provide NotificationObserver implementation. |
| 167 virtual void Observe(NotificationType type, | 167 virtual void Observe(int type, |
| 168 const NotificationSource& source, | 168 const NotificationSource& source, |
| 169 const NotificationDetails& details); | 169 const NotificationDetails& details); |
| 170 | 170 |
| 171 // Advance the loading animation to the next frame, or hide the animation if | 171 // Advance the loading animation to the next frame, or hide the animation if |
| 172 // the tab isn't loading. Returns |true| if the icon area needs to be | 172 // the tab isn't loading. Returns |true| if the icon area needs to be |
| 173 // repainted. | 173 // repainted. |
| 174 bool ValidateLoadingAnimation(AnimationState animation_state); | 174 bool ValidateLoadingAnimation(AnimationState animation_state); |
| 175 | 175 |
| 176 // Repaint only the area of the tab that contains the favicon. | 176 // Repaint only the area of the tab that contains the favicon. |
| 177 void PaintFaviconArea(GdkEventExpose* event); | 177 void PaintFaviconArea(GdkEventExpose* event); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 // The current color of the close button. | 449 // The current color of the close button. |
| 450 SkColor close_button_color_; | 450 SkColor close_button_color_; |
| 451 | 451 |
| 452 // Used to listen for theme change notifications. | 452 // Used to listen for theme change notifications. |
| 453 NotificationRegistrar registrar_; | 453 NotificationRegistrar registrar_; |
| 454 | 454 |
| 455 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); | 455 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); |
| 456 }; | 456 }; |
| 457 | 457 |
| 458 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ | 458 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ |
| OLD | NEW |