| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_LOCATION_BAR_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // visible or hidden. |contents| is the TabContents that is active, |url| | 113 // visible or hidden. |contents| is the TabContents that is active, |url| |
| 114 // is the current page URL. | 114 // is the current page URL. |
| 115 void UpdateVisibility(TabContents* contents, GURL url); | 115 void UpdateVisibility(TabContents* contents, GURL url); |
| 116 | 116 |
| 117 // A callback from ImageLoadingTracker for when the image has loaded. | 117 // A callback from ImageLoadingTracker for when the image has loaded. |
| 118 virtual void OnImageLoaded(SkBitmap* image, size_t index); | 118 virtual void OnImageLoaded(SkBitmap* image, size_t index); |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 static gboolean OnButtonPressed(GtkWidget* sender, GdkEventButton* event, | 121 static gboolean OnButtonPressed(GtkWidget* sender, GdkEventButton* event, |
| 122 PageActionViewGtk* page_action_view); | 122 PageActionViewGtk* page_action_view); |
| 123 static gboolean OnExposeEvent(GtkWidget* widget, |
| 124 GdkEventExpose* event, |
| 125 PageActionViewGtk* page_action_view); |
| 123 | 126 |
| 124 // The location bar view that owns us. | 127 // The location bar view that owns us. |
| 125 LocationBarViewGtk* owner_; | 128 LocationBarViewGtk* owner_; |
| 126 | 129 |
| 127 // The current profile (not owned by us). | 130 // The current profile (not owned by us). |
| 128 Profile* profile_; | 131 Profile* profile_; |
| 129 | 132 |
| 130 // The PageAction that this view represents. The PageAction is not owned by | 133 // The PageAction that this view represents. The PageAction is not owned by |
| 131 // us, it resides in the extension of this particular profile. | 134 // us, it resides in the extension of this particular profile. |
| 132 const ExtensionAction* page_action_; | 135 const ExtensionAction* page_action_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 149 OwnedWidgetGtk image_; | 152 OwnedWidgetGtk image_; |
| 150 | 153 |
| 151 // The tab id we are currently showing the icon for. | 154 // The tab id we are currently showing the icon for. |
| 152 int current_tab_id_; | 155 int current_tab_id_; |
| 153 | 156 |
| 154 // The URL we are currently showing the icon for. | 157 // The URL we are currently showing the icon for. |
| 155 GURL current_url_; | 158 GURL current_url_; |
| 156 | 159 |
| 157 DISALLOW_COPY_AND_ASSIGN(PageActionViewGtk); | 160 DISALLOW_COPY_AND_ASSIGN(PageActionViewGtk); |
| 158 }; | 161 }; |
| 162 friend class PageActionViewGtk; |
| 159 | 163 |
| 160 static gboolean HandleExposeThunk(GtkWidget* widget, GdkEventExpose* event, | 164 static gboolean HandleExposeThunk(GtkWidget* widget, GdkEventExpose* event, |
| 161 gpointer userdata) { | 165 gpointer userdata) { |
| 162 return reinterpret_cast<LocationBarViewGtk*>(userdata)-> | 166 return reinterpret_cast<LocationBarViewGtk*>(userdata)-> |
| 163 HandleExpose(widget, event); | 167 HandleExpose(widget, event); |
| 164 } | 168 } |
| 165 | 169 |
| 166 gboolean HandleExpose(GtkWidget* widget, GdkEventExpose* event); | 170 gboolean HandleExpose(GtkWidget* widget, GdkEventExpose* event); |
| 167 | 171 |
| 168 static gboolean OnSecurityIconPressed(GtkWidget* sender, | 172 static gboolean OnSecurityIconPressed(GtkWidget* sender, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 243 |
| 240 // Provides colors and rendering mode. | 244 // Provides colors and rendering mode. |
| 241 GtkThemeProvider* theme_provider_; | 245 GtkThemeProvider* theme_provider_; |
| 242 | 246 |
| 243 NotificationRegistrar registrar_; | 247 NotificationRegistrar registrar_; |
| 244 | 248 |
| 245 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); | 249 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); |
| 246 }; | 250 }; |
| 247 | 251 |
| 248 #endif // CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ | 252 #endif // CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| OLD | NEW |