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

Unified Diff: chrome/browser/resources/extensions/extension_list.js

Issue 475543003: Display extension options in a WebUI overlay instead of in a new tab (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/resources/extensions/extension_list.js
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js
index 7067da5d00362dd398a95e914e17ca357a3a74ea..8e830a683d05df332aa85eec056675020ae331e7 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -193,7 +193,15 @@ cr.define('options', function() {
if (extension.enabled && extension.optionsUrl) {
var options = node.querySelector('.options-link');
options.addEventListener('click', function(e) {
- chrome.send('extensionSettingsOptions', [extension.id]);
+ chrome.commandLinePrivate.hasSwitch(
Dan Beam 2014/08/14 19:01:26 ^ why are we doing this in JS instead of in C++ an
ericzeng 2014/08/14 22:34:13 Is there a convenient way to send the flags check
Devlin 2014/08/15 15:19:50 Since this is in ExtensionsList, we could just set
not at google - send to devlin 2014/08/15 15:51:06 I kind of like this using an extension API :) less
ericzeng 2014/08/15 18:05:25 Done.
+ 'enable-embedded-extension-options', function(result) {
Dan Beam 2014/08/14 19:01:26 chrome.commandLinePrivate.hasSwitch( 'enable-e
ericzeng 2014/08/14 22:34:13 Done.
+ if (result) {
+ extensions.ExtensionOptionsOverlay.getInstance()
+ .setExtensionAndShowOverlay([extension.id], extension.name);
Dan Beam 2014/08/14 19:01:26 dot at end: extensions.ExtensionOptionsOverlay.ge
ericzeng 2014/08/14 22:34:13 Done.
+ } else {
+ chrome.send('extensionSettingsOptions', [extension.id]);
+ }
+ });
e.preventDefault();
});
options.hidden = false;

Powered by Google App Engine
This is Rietveld 408576698