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

Side by Side Diff: chrome/browser/resources/extensions/extension_options_overlay.js

Issue 484033003: Open embedded extension options from the extension action context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('extensions', function() { 5 cr.define('extensions', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * The ExtensionOptionsOverlay will show an extension's options page using 9 * The ExtensionOptionsOverlay will show an extension's options page using
10 * an <extensionoptions> element. 10 * an <extensionoptions> element.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 handleDismiss_: function(event) { 48 handleDismiss_: function(event) {
49 this.setVisible_(false); 49 this.setVisible_(false);
50 var extensionoptions = 50 var extensionoptions =
51 $('extension-options-overlay-guest') 51 $('extension-options-overlay-guest')
52 .querySelector('extensionoptions'); 52 .querySelector('extensionoptions');
53 53
54 if (extensionoptions) 54 if (extensionoptions)
55 $('extension-options-overlay-guest').removeChild(extensionoptions); 55 $('extension-options-overlay-guest').removeChild(extensionoptions);
56 56
57 $('extension-options-overlay-icon').removeAttribute('src'); 57 $('extension-options-overlay-icon').removeAttribute('src');
58
59 // Remove the options query string.
60 window.parent.postMessage({
61 method: 'updateHistory',
62 params: {state: {}, path: '', replace: false}
not at google - send to devlin 2014/08/25 18:11:07 Same comments here in the other file.
ericzeng 2014/08/25 21:42:34 Done.
63 }, 'chrome://chrome');
58 }, 64 },
59 65
60 /** 66 /**
61 * Associate an extension with the overlay and display it. 67 * Associate an extension with the overlay and display it.
62 * @param {string} extensionId The id of the extension whose options page 68 * @param {string} extensionId The id of the extension whose options page
63 * should be displayed in the overlay. 69 * should be displayed in the overlay.
64 * @param {string} extensionName The name of the extension, which is used 70 * @param {string} extensionName The name of the extension, which is used
65 * as the header of the overlay. 71 * as the header of the overlay.
66 * @param {string} extensionIcon The URL of the extension's icon. 72 * @param {string} extensionIcon The URL of the extension's icon.
67 */ 73 */
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 setVisible_: function(isVisible) { 155 setVisible_: function(isVisible) {
150 this.showOverlay_(isVisible ? $('extension-options-overlay') : null); 156 this.showOverlay_(isVisible ? $('extension-options-overlay') : null);
151 } 157 }
152 }; 158 };
153 159
154 // Export 160 // Export
155 return { 161 return {
156 ExtensionOptionsOverlay: ExtensionOptionsOverlay 162 ExtensionOptionsOverlay: ExtensionOptionsOverlay
157 }; 163 };
158 }); 164 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698