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

Unified Diff: chrome/browser/gtk/toolbar_star_toggle_gtk.h

Issue 149681: GTK Themes: Make the omnibox area look more native. (Closed)
Patch Set: Change names for Dean Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/gtk/toolbar_star_toggle_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/toolbar_star_toggle_gtk.h
diff --git a/chrome/browser/gtk/toolbar_star_toggle_gtk.h b/chrome/browser/gtk/toolbar_star_toggle_gtk.h
index afa61a313135031ab5df8e2c44d376709485d67d..2284415deb62fcc21e47cc16b35abe1f4bdb2e4a 100644
--- a/chrome/browser/gtk/toolbar_star_toggle_gtk.h
+++ b/chrome/browser/gtk/toolbar_star_toggle_gtk.h
@@ -9,17 +9,25 @@
#include "base/basictypes.h"
#include "chrome/browser/gtk/custom_button.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
#include "chrome/common/owned_widget_gtk.h"
class BrowserToolbarGtk;
+class GtkThemeProvider;
class GURL;
// Displays the bookmark star button, which toggles between two images.
-class ToolbarStarToggleGtk {
+class ToolbarStarToggleGtk : public NotificationObserver {
public:
- ToolbarStarToggleGtk(BrowserToolbarGtk* host);
+ explicit ToolbarStarToggleGtk(BrowserToolbarGtk* host);
~ToolbarStarToggleGtk();
+ // Provide NotificationObserver implementation.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
// If the bubble isn't showing, shows it above the star button.
void ShowStarBubble(const GURL& url, bool newly_bookmarked);
@@ -28,10 +36,17 @@ class ToolbarStarToggleGtk {
GtkWidget* widget() const { return widget_.get(); }
private:
+ // Updates the properties of |widget_| when we would need to change its
+ // state.
+ void UpdateGTKButton();
+
// Callback for expose, used to draw the custom graphics.
static gboolean OnExpose(GtkWidget* widget, GdkEventExpose* e,
ToolbarStarToggleGtk* obj);
+ // Used to listen for theme change notifications.
+ NotificationRegistrar registrar_;
+
// The browser toolbar hosting this widget, for getting the current profile.
BrowserToolbarGtk* host_;
@@ -41,6 +56,8 @@ class ToolbarStarToggleGtk {
// Whether we show the yellow star.
bool is_starred_;
+ GtkThemeProvider* theme_provider_;
+
CustomDrawButtonBase unstarred_;
CustomDrawButtonBase starred_;
« no previous file with comments | « chrome/browser/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/gtk/toolbar_star_toggle_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698