summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/gtk/bookmark_bubble_gtk.cc1
-rw-r--r--chrome/browser/gtk/extension_popup_gtk.cc1
-rw-r--r--chrome/browser/gtk/first_run_bubble.cc1
-rw-r--r--chrome/browser/gtk/info_bubble_gtk.cc11
-rw-r--r--chrome/browser/gtk/info_bubble_gtk.h8
5 files changed, 17 insertions, 5 deletions
diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.cc b/chrome/browser/gtk/bookmark_bubble_gtk.cc
index 5b32c7f..4c29a1b 100644
--- a/chrome/browser/gtk/bookmark_bubble_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bubble_gtk.cc
@@ -224,6 +224,7 @@ BookmarkBubbleGtk::BookmarkBubbleGtk(GtkWindow* toplevel_window,
rect,
content,
arrow_location,
+ true,
theme_provider_,
this); // delegate
if (!bubble_) {
diff --git a/chrome/browser/gtk/extension_popup_gtk.cc b/chrome/browser/gtk/extension_popup_gtk.cc
index 180f8e2..e14ff90 100644
--- a/chrome/browser/gtk/extension_popup_gtk.cc
+++ b/chrome/browser/gtk/extension_popup_gtk.cc
@@ -72,6 +72,7 @@ void ExtensionPopupGtk::ShowPopup() {
relative_to_,
host_->view()->native_view(),
arrow_location,
+ false,
GtkThemeProvider::GetFrom(browser_->profile()),
this);
}
diff --git a/chrome/browser/gtk/first_run_bubble.cc b/chrome/browser/gtk/first_run_bubble.cc
index 4624f7d..96cf7411 100644
--- a/chrome/browser/gtk/first_run_bubble.cc
+++ b/chrome/browser/gtk/first_run_bubble.cc
@@ -150,6 +150,7 @@ FirstRunBubble::FirstRunBubble(Profile* profile,
rect,
content_,
arrow_location,
+ true,
theme_provider_,
this); // delegate
if (!bubble_) {
diff --git a/chrome/browser/gtk/info_bubble_gtk.cc b/chrome/browser/gtk/info_bubble_gtk.cc
index a480905..4381642 100644
--- a/chrome/browser/gtk/info_bubble_gtk.cc
+++ b/chrome/browser/gtk/info_bubble_gtk.cc
@@ -48,15 +48,17 @@ InfoBubbleGtk* InfoBubbleGtk::Show(GtkWindow* toplevel_window,
const gfx::Rect& rect,
GtkWidget* content,
ArrowLocationGtk arrow_location,
+ bool match_system_theme,
GtkThemeProvider* provider,
InfoBubbleGtkDelegate* delegate) {
- InfoBubbleGtk* bubble = new InfoBubbleGtk(provider);
+ InfoBubbleGtk* bubble = new InfoBubbleGtk(provider, match_system_theme);
bubble->Init(toplevel_window, rect, content, arrow_location);
bubble->set_delegate(delegate);
return bubble;
}
-InfoBubbleGtk::InfoBubbleGtk(GtkThemeProvider* provider)
+InfoBubbleGtk::InfoBubbleGtk(GtkThemeProvider* provider,
+ bool match_system_theme)
: delegate_(NULL),
window_(NULL),
theme_provider_(provider),
@@ -64,7 +66,8 @@ InfoBubbleGtk::InfoBubbleGtk(GtkThemeProvider* provider)
toplevel_window_(NULL),
mask_region_(NULL),
preferred_arrow_location_(ARROW_LOCATION_TOP_LEFT),
- current_arrow_location_(ARROW_LOCATION_TOP_LEFT) {
+ current_arrow_location_(ARROW_LOCATION_TOP_LEFT),
+ match_system_theme_(match_system_theme) {
}
InfoBubbleGtk::~InfoBubbleGtk() {
@@ -307,7 +310,7 @@ void InfoBubbleGtk::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
DCHECK_EQ(type.value, NotificationType::BROWSER_THEME_CHANGED);
- if (theme_provider_->UseGtkTheme()) {
+ if (theme_provider_->UseGtkTheme() && match_system_theme_) {
gtk_widget_modify_bg(window_, GTK_STATE_NORMAL, NULL);
} else {
// Set the background color, so we don't need to paint it manually.
diff --git a/chrome/browser/gtk/info_bubble_gtk.h b/chrome/browser/gtk/info_bubble_gtk.h
index 0632e9d..0d882ee 100644
--- a/chrome/browser/gtk/info_bubble_gtk.h
+++ b/chrome/browser/gtk/info_bubble_gtk.h
@@ -57,6 +57,7 @@ class InfoBubbleGtk : public NotificationObserver {
const gfx::Rect& rect,
GtkWidget* content,
ArrowLocationGtk arrow_location,
+ bool match_system_theme,
GtkThemeProvider* provider,
InfoBubbleGtkDelegate* delegate);
@@ -85,7 +86,7 @@ class InfoBubbleGtk : public NotificationObserver {
FRAME_STROKE,
};
- explicit InfoBubbleGtk(GtkThemeProvider* provider);
+ explicit InfoBubbleGtk(GtkThemeProvider* provider, bool match_system_theme);
virtual ~InfoBubbleGtk();
// Creates the InfoBubble.
@@ -226,6 +227,11 @@ class InfoBubbleGtk : public NotificationObserver {
ArrowLocationGtk preferred_arrow_location_;
ArrowLocationGtk current_arrow_location_;
+ // Whether the background should match the system theme, when the system theme
+ // is being used. For example, the bookmark bubble does, but extension popups
+ // do not.
+ bool match_system_theme_;
+
NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(InfoBubbleGtk);