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

Unified Diff: extensions/common/extension.cc

Issue 919733002: [Extensions Toolbar] Have all extensions in the toolbar show a context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension.cc
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index b721406701d0732e6fd83eec12798d41024cb329..e41c9dcafe53708c0e4ff4197162bd676f84b0fc 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -24,6 +24,7 @@
#include "content/public/common/url_constants.h"
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
+#include "extensions/common/feature_switch.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/manifest_handler.h"
@@ -275,8 +276,11 @@ bool Extension::ShowConfigureContextMenus() const {
// options for component extension button but now there is no component
// extension with options. All other menu items like uninstall have
// no sense for component extensions.
+ // We change this rule if the redesign is enabled, because it's just weird to
+ // have a random button that has no context menu when the rest do.
return location() != Manifest::COMPONENT &&
- location() != Manifest::EXTERNAL_COMPONENT;
+ location() != Manifest::EXTERNAL_COMPONENT &&
+ !FeatureSwitch::extension_action_redesign()->IsEnabled();
Finnur 2015/02/13 14:49:59 But what does the menu show for component extensio
Devlin 2015/02/13 18:06:54 Good questions, all! So, first off, the only comp
Finnur 2015/02/16 11:39:51 I'd be surprised if they are different, but in any
Finnur 2015/02/16 11:39:51 Hah! I made the same mistake you did when I review
Devlin 2015/02/17 18:40:41 Yes, that is more readable. :) Done.
}
bool Extension::OverlapsWithOrigin(const GURL& origin) const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698