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

Unified Diff: chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc

Issue 10703090: Turn pageAction.show -> browserAction.sensibleThing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: views (incomplete) Created 8 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
Index: chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index 332395c435abf69362b9b2e55a0f25722b390d71..77f15558049ba20e96b79ebfd90956e94def5b2e 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -237,6 +237,8 @@ class BrowserActionButton : public content::NotificationObserver,
} else if (default_icon_) {
SetImage(default_icon_);
}
+ UpdateEnabledness(tab_id);
+
gtk_widget_queue_draw(button());
}
@@ -279,6 +281,11 @@ class BrowserActionButton : public content::NotificationObserver,
}
}
+ void UpdateEnabledness(int tab_id) {
+ bool visible = extension_->browser_action()->GetIsVisible(tab_id);
+ gtk_widget_set_sensitive(button(), visible ? TRUE : FALSE);
+ }
+
// MenuGtk::Delegate implementation.
virtual void StoppedShowing() {
button_->UnsetPaintOverride();
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/browser_action_button.mm ('k') | chrome/browser/ui/views/browser_action_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698