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

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

Issue 2921783003: WebUI: Fix/suppress some existing violations of no-restricted-globals. (Closed)
Patch Set: Address comment. Created 3 years, 6 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 (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="shortcut_util.js"> 5 // <include src="shortcut_util.js">
6 6
7 cr.define('extensions', function() { 7 cr.define('extensions', function() {
8 'use strict'; 8 'use strict';
9 9
10 /** 10 /**
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 keybinding: ''}); 371 keybinding: ''});
372 }, 372 },
373 373
374 /** 374 /**
375 * A handler for the setting the scope of the command. 375 * A handler for the setting the scope of the command.
376 * @param {Event} event The mouse event to consider. 376 * @param {Event} event The mouse event to consider.
377 * @private 377 * @private
378 */ 378 */
379 handleSetCommandScope_: function(event) { 379 handleSetCommandScope_: function(event) {
380 var parsed = this.parseElementId_('setCommandScope', event.target.id); 380 var parsed = this.parseElementId_('setCommandScope', event.target.id);
381 var element = document.getElementById( 381 var element = $(
382 'setCommandScope-' + parsed.extensionId + '-' + parsed.commandName); 382 'setCommandScope-' + parsed.extensionId + '-' + parsed.commandName);
383 var scope = element.selectedIndex == 1 ? 383 var scope = element.selectedIndex == 1 ?
384 chrome.developerPrivate.CommandScope.GLOBAL : 384 chrome.developerPrivate.CommandScope.GLOBAL :
385 chrome.developerPrivate.CommandScope.CHROME; 385 chrome.developerPrivate.CommandScope.CHROME;
386 chrome.developerPrivate.updateExtensionCommand( 386 chrome.developerPrivate.updateExtensionCommand(
387 {extensionId: parsed.extensionId, 387 {extensionId: parsed.extensionId,
388 commandName: parsed.commandName, 388 commandName: parsed.commandName,
389 scope: scope}); 389 scope: scope});
390 }, 390 },
391 391
(...skipping 24 matching lines...) Expand all
416 namespace.length + 1 + kExtensionIdLength), 416 namespace.length + 1 + kExtensionIdLength),
417 commandName: id.substring(namespace.length + 1 + kExtensionIdLength + 1) 417 commandName: id.substring(namespace.length + 1 + kExtensionIdLength + 1)
418 }; 418 };
419 }, 419 },
420 }; 420 };
421 421
422 return { 422 return {
423 ExtensionCommandList: ExtensionCommandList 423 ExtensionCommandList: ExtensionCommandList
424 }; 424 };
425 }); 425 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698