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 uber.replaceState({}, ''); |
58 }, | 61 }, |
59 | 62 |
60 /** | 63 /** |
61 * Associate an extension with the overlay and display it. | 64 * Associate an extension with the overlay and display it. |
62 * @param {string} extensionId The id of the extension whose options page | 65 * @param {string} extensionId The id of the extension whose options page |
63 * should be displayed in the overlay. | 66 * should be displayed in the overlay. |
64 * @param {string} extensionName The name of the extension, which is used | 67 * @param {string} extensionName The name of the extension, which is used |
65 * as the header of the overlay. | 68 * as the header of the overlay. |
66 * @param {string} extensionIcon The URL of the extension's icon. | 69 * @param {string} extensionIcon The URL of the extension's icon. |
67 */ | 70 */ |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 setVisible_: function(isVisible) { | 152 setVisible_: function(isVisible) { |
150 this.showOverlay_(isVisible ? $('extension-options-overlay') : null); | 153 this.showOverlay_(isVisible ? $('extension-options-overlay') : null); |
151 } | 154 } |
152 }; | 155 }; |
153 | 156 |
154 // Export | 157 // Export |
155 return { | 158 return { |
156 ExtensionOptionsOverlay: ExtensionOptionsOverlay | 159 ExtensionOptionsOverlay: ExtensionOptionsOverlay |
157 }; | 160 }; |
158 }); | 161 }); |
OLD | NEW |