OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 }); |
OLD | NEW |