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

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

Issue 10832196: [extensions] Don't let clicks on <a href="#"> links escape un-prevented. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <include src="../shared/js/cr/ui/drag_wrapper.js"></include>
6 <include src="../uber/uber_utils.js"></include> 5 <include src="../uber/uber_utils.js"></include>
7 <include src="extension_commands_overlay.js"></include> 6 <include src="extension_commands_overlay.js"></include>
8 <include src="extension_focus_manager.js"></include> 7 <include src="extension_focus_manager.js"></include>
9 <include src="extension_list.js"></include> 8 <include src="extension_list.js"></include>
10 <include src="pack_extension_overlay.js"></include> 9 <include src="pack_extension_overlay.js"></include>
11 10
12 // Used for observing function of the backend datasource for this page by 11 // Used for observing function of the backend datasource for this page by
13 // tests. 12 // tests.
14 var webui_responded_ = false; 13 var webui_responded_ = false;
15 14
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 this.handleExtensionCommandsConfig_.bind(this)); 108 this.handleExtensionCommandsConfig_.bind(this));
110 109
111 // Initialize the Commands overlay. 110 // Initialize the Commands overlay.
112 var extensionCommandsOverlay = 111 var extensionCommandsOverlay =
113 extensions.ExtensionCommandsOverlay.getInstance(); 112 extensions.ExtensionCommandsOverlay.getInstance();
114 extensionCommandsOverlay.initializePage(); 113 extensionCommandsOverlay.initializePage();
115 114
116 cr.ui.overlay.setupOverlay($('dropTargetOverlay')); 115 cr.ui.overlay.setupOverlay($('dropTargetOverlay'));
117 116
118 extensions.ExtensionFocusManager.getInstance().initialize(); 117 extensions.ExtensionFocusManager.getInstance().initialize();
118
119 preventPoundLinkClicks(); // From shared/js/util.js.
119 }, 120 },
120 121
121 /** 122 /**
122 * Handles the Load Unpacked Extension button. 123 * Handles the Load Unpacked Extension button.
123 * @param {Event} e Change event. 124 * @param {Event} e Change event.
124 * @private 125 * @private
125 */ 126 */
126 handleLoadUnpackedExtension_: function(e) { 127 handleLoadUnpackedExtension_: function(e) {
127 chrome.send('extensionSettingsLoadUnpackedExtension'); 128 chrome.send('extensionSettingsLoadUnpackedExtension');
128 129
(...skipping 15 matching lines...) Expand all
144 145
145 /** 146 /**
146 * Handles the Configure (Extension) Commands link. 147 * Handles the Configure (Extension) Commands link.
147 * @param {Event} e Change event. 148 * @param {Event} e Change event.
148 * @private 149 * @private
149 */ 150 */
150 handleExtensionCommandsConfig_: function(e) { 151 handleExtensionCommandsConfig_: function(e) {
151 ExtensionSettings.showOverlay($('extensionCommandsOverlay')); 152 ExtensionSettings.showOverlay($('extensionCommandsOverlay'));
152 chrome.send('coreOptionsUserMetricsAction', 153 chrome.send('coreOptionsUserMetricsAction',
153 ['Options_ExtensionCommands']); 154 ['Options_ExtensionCommands']);
154 e.preventDefault();
155 }, 155 },
156 156
157 /** 157 /**
158 * Handles the Update Extension Now button. 158 * Handles the Update Extension Now button.
159 * @param {Event} e Change event. 159 * @param {Event} e Change event.
160 * @private 160 * @private
161 */ 161 */
162 handleUpdateExtensionNow_: function(e) { 162 handleUpdateExtensionNow_: function(e) {
163 chrome.send('extensionSettingsAutoupdate'); 163 chrome.send('extensionSettingsAutoupdate');
164 }, 164 },
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 return { 333 return {
334 ExtensionSettings: ExtensionSettings 334 ExtensionSettings: ExtensionSettings
335 }; 335 };
336 }); 336 });
337 337
338 var ExtensionSettings = extensions.ExtensionSettings; 338 var ExtensionSettings = extensions.ExtensionSettings;
339 339
340 window.addEventListener('load', function(e) { 340 window.addEventListener('load', function(e) {
341 ExtensionSettings.getInstance().initialize(); 341 ExtensionSettings.getInstance().initialize();
342 }); 342 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698