| Index: chrome/browser/ui/gtk/custom_button.cc
|
| diff --git a/chrome/browser/ui/gtk/custom_button.cc b/chrome/browser/ui/gtk/custom_button.cc
|
| index fe2b52a28df5a7ffa2f1237a4ff57c7a93ade5f7..26fe1b410e094424167cb276a892da98280f2e4d 100644
|
| --- a/chrome/browser/ui/gtk/custom_button.cc
|
| +++ b/chrome/browser/ui/gtk/custom_button.cc
|
| @@ -238,7 +238,8 @@ CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider,
|
| GtkIconSize stock_size)
|
| : button_base_(theme_provider, normal_id, pressed_id, hover_id,
|
| disabled_id),
|
| - theme_service_(theme_provider) {
|
| + theme_service_(theme_provider),
|
| + forcing_chrome_theme_(false) {
|
| native_widget_.Own(gtk_image_new_from_stock(stock_id, stock_size));
|
|
|
| Init();
|
| @@ -258,7 +259,8 @@ CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider,
|
| : button_base_(theme_provider, normal_id, pressed_id, hover_id,
|
| disabled_id),
|
| native_widget_(native_widget),
|
| - theme_service_(theme_provider) {
|
| + theme_service_(theme_provider),
|
| + forcing_chrome_theme_(false) {
|
| Init();
|
|
|
| theme_service_->InitThemesFor(this);
|
| @@ -280,6 +282,11 @@ void CustomDrawButton::Init() {
|
| hover_controller_.Init(widget());
|
| }
|
|
|
| +void CustomDrawButton::ForceChromeTheme() {
|
| + forcing_chrome_theme_ = true;
|
| + SetBrowserTheme();
|
| +}
|
| +
|
| void CustomDrawButton::Observe(int type,
|
| const NotificationSource& source, const NotificationDetails& details) {
|
| DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
|
| @@ -350,5 +357,6 @@ void CustomDrawButton::SetBrowserTheme() {
|
| }
|
|
|
| bool CustomDrawButton::UseGtkTheme() {
|
| - return theme_service_ && theme_service_->UsingNativeTheme();
|
| + return !forcing_chrome_theme_ && theme_service_ &&
|
| + theme_service_->UsingNativeTheme();
|
| }
|
|
|