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

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

Issue 518653002: Add the "options_ui" extension manifest field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/extensions/extension_context_menu_model.cc
diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc
index 022e935665f6e08e60cb2b0f8d942376e02d2489..ecdbf6c8dac3cc8964a3b7038b57701e02ac87f0 100644
--- a/chrome/browser/extensions/extension_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_context_menu_model.cc
@@ -36,6 +36,7 @@
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension.h"
#include "extensions/common/feature_switch.h"
+#include "extensions/common/manifest_handlers/options_page_info.h"
#include "ui/base/l10n/l10n_util.h"
using content::OpenURLParams;
@@ -141,8 +142,9 @@ bool ExtensionContextMenuModel::IsCommandIdEnabled(int command_id) const {
command_id <= IDC_EXTENSIONS_CONTEXT_CUSTOM_LAST) {
return extension_items_->IsCommandIdEnabled(command_id);
} else if (command_id == CONFIGURE) {
- return
- extensions::ManifestURL::GetOptionsPage(extension).spec().length() > 0;
+ return extensions::OptionsPageInfo::GetOptionsPage(extension)
+ .spec()
+ .length() > 0;
not at google - send to devlin 2014/08/29 05:39:23 Weird. You can write (url.spec().length() > 0) as
ericzeng 2014/08/29 22:08:49 Done.
} else if (command_id == NAME) {
// The NAME links to the Homepage URL. If the extension doesn't have a
// homepage, we just disable this menu item.
@@ -200,7 +202,8 @@ void ExtensionContextMenuModel::ExecuteCommand(int command_id,
break;
}
case CONFIGURE:
- DCHECK(!extensions::ManifestURL::GetOptionsPage(extension).is_empty());
+ DCHECK(
+ !extensions::OptionsPageInfo::GetOptionsPage(extension).is_empty());
extensions::ExtensionTabUtil::OpenOptionsPage(extension, browser_);
break;
case TOGGLE_VISIBILITY: {

Powered by Google App Engine
This is Rietveld 408576698