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

Unified Diff: chrome/browser/extensions/extension_toolbar_model.cc

Issue 1004063003: [Extensions] Add logic for when to show the toolbar redesign bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/extensions/extension_toolbar_model.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_toolbar_model.cc
diff --git a/chrome/browser/extensions/extension_toolbar_model.cc b/chrome/browser/extensions/extension_toolbar_model.cc
index 20191775e0f685b8b428e6080b36d929920b3074..ac84f365434e411852ea1e4b891ffce48e15ecbb 100644
--- a/chrome/browser/extensions/extension_toolbar_model.cc
+++ b/chrome/browser/extensions/extension_toolbar_model.cc
@@ -32,6 +32,7 @@
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/feature_switch.h"
+#include "extensions/common/manifest_constants.h"
#include "extensions/common/one_shot_event.h"
namespace extensions {
@@ -742,4 +743,15 @@ void ExtensionToolbarModel::StopHighlighting() {
}
}
+bool ExtensionToolbarModel::RedesignIsShowingNewIcons() const {
+ for (const scoped_refptr<const Extension>& extension : toolbar_items_) {
+ // Without the redesign, we only show extensions with browser actions.
+ // Any extension without a browser action is an indication that we're
+ // showing something new.
+ if (!extension->manifest()->HasKey(manifest_keys::kBrowserAction))
+ return true;
+ }
+ return false;
+}
+
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698