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

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: Test 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 | « chrome/browser/extensions/extension_context_menu_model_unittest.cc ('k') | 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..7c202734d3573ddfdc51d144fd07ad0dc1cb23e3 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
Finnur 2015/02/16 11:39:51 This comment is now out of date (no component exte
Devlin 2015/02/17 18:40:41 Acknowledged.
// no sense for component extensions.
- return location() != Manifest::COMPONENT &&
- location() != Manifest::EXTERNAL_COMPONENT;
+ // 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) ||
+ FeatureSwitch::extension_action_redesign()->IsEnabled();
}
bool Extension::OverlapsWithOrigin(const GURL& origin) const {
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698