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

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

Issue 160025: GTK Themes: Theme the bookmark bubble. (And first run bubble). (Closed)
Patch Set: Remove text_color for estade 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 | « no previous file | chrome/browser/gtk/bookmark_bubble_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_bubble_gtk.h
diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.h b/chrome/browser/gtk/bookmark_bubble_gtk.h
index 48890b60e9208689e48d15fefa0ed2787d461f44..3b86a6bd7300727b70a5e48c3fe53e6471fb234f 100644
--- a/chrome/browser/gtk/bookmark_bubble_gtk.h
+++ b/chrome/browser/gtk/bookmark_bubble_gtk.h
@@ -14,11 +14,14 @@
#include <gtk/gtk.h>
+#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/task.h"
#include "chrome/browser/gtk/info_bubble_gtk.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
class BookmarkNode;
@@ -27,7 +30,8 @@ namespace gfx {
class Rect;
}
-class BookmarkBubbleGtk : public InfoBubbleGtkDelegate {
+class BookmarkBubbleGtk : public InfoBubbleGtkDelegate,
+ public NotificationObserver {
public:
// Shows the bookmark bubble, pointing at |rect|.
static void Show(GtkWindow* transient_toplevel,
@@ -42,6 +46,11 @@ class BookmarkBubbleGtk : public InfoBubbleGtkDelegate {
virtual void InfoBubbleClosing(InfoBubbleGtk* info_bubble,
bool closed_by_escape);
+ // Overridden from NotificationObserver:
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
private:
BookmarkBubbleGtk(GtkWindow* transient_toplevel,
const gfx::Rect& rect,
@@ -107,6 +116,9 @@ class BookmarkBubbleGtk : public InfoBubbleGtkDelegate {
// Our current profile (used to access the bookmark system).
Profile* profile_;
+ // Provides colors and stuff.
+ GtkThemeProvider* theme_provider_;
+
// The toplevel window our dialogs should be transient for.
GtkWindow* transient_toplevel_;
@@ -114,6 +126,10 @@ class BookmarkBubbleGtk : public InfoBubbleGtkDelegate {
// when the widget is destroyed (when the InfoBubble is destroyed).
GtkWidget* content_;
+ // The various labels in the interface. We keep track of them for theme
+ // changes.
+ std::vector<GtkWidget*> labels_;
+
// The GtkEntry for editing the bookmark name / title.
GtkWidget* name_entry_;
@@ -135,6 +151,8 @@ class BookmarkBubbleGtk : public InfoBubbleGtkDelegate {
bool apply_edits_;
bool remove_bookmark_;
+ NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk);
};
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698