| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "app/animation.h" | 10 #include "app/animation.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 GtkWidget* widget() const { return tab_.get(); } | 172 GtkWidget* widget() const { return tab_.get(); } |
| 173 | 173 |
| 174 protected: | 174 protected: |
| 175 const gfx::Rect& title_bounds() const { return title_bounds_; } | 175 const gfx::Rect& title_bounds() const { return title_bounds_; } |
| 176 const gfx::Rect& close_button_bounds() const { return close_button_bounds_; } | 176 const gfx::Rect& close_button_bounds() const { return close_button_bounds_; } |
| 177 | 177 |
| 178 // Returns the title of the Tab. | 178 // Returns the title of the Tab. |
| 179 std::wstring GetTitle() const; | 179 std::wstring GetTitle() const; |
| 180 | 180 |
| 181 // Called by TabGtk to notify the renderer that the tab is being hovered. | 181 // enter-notify-event handler that signals when the mouse enters the tab. |
| 182 void OnMouseEntered(); | 182 static gboolean OnEnterNotifyEvent(GtkWidget* widget, GdkEventCrossing* event, |
| 183 TabRendererGtk* tab); |
| 183 | 184 |
| 184 // Called by TabGtk to notify the renderer that the tab is no longer being | 185 // leave-notify-event handler that signals when the mouse enters the tab. |
| 185 // hovered. | 186 static gboolean OnLeaveNotifyEvent(GtkWidget* widget, GdkEventCrossing* event, |
| 186 void OnMouseExited(); | 187 TabRendererGtk* tab); |
| 187 | 188 |
| 188 private: | 189 private: |
| 189 class FavIconCrashAnimation; | 190 class FavIconCrashAnimation; |
| 190 | 191 |
| 191 // Model data. We store this here so that we don't need to ask the underlying | 192 // Model data. We store this here so that we don't need to ask the underlying |
| 192 // model, which is tricky since instances of this object can outlive the | 193 // model, which is tricky since instances of this object can outlive the |
| 193 // corresponding objects in the underlying model. | 194 // corresponding objects in the underlying model. |
| 194 struct TabData { | 195 struct TabData { |
| 195 SkBitmap favicon; | 196 SkBitmap favicon; |
| 196 string16 title; | 197 string16 title; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 // The close button. | 346 // The close button. |
| 346 scoped_ptr<CustomDrawButton> close_button_; | 347 scoped_ptr<CustomDrawButton> close_button_; |
| 347 | 348 |
| 348 // The current color of the close button. | 349 // The current color of the close button. |
| 349 SkColor close_button_color_; | 350 SkColor close_button_color_; |
| 350 | 351 |
| 351 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); | 352 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); |
| 352 }; | 353 }; |
| 353 | 354 |
| 354 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ | 355 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ |
| OLD | NEW |