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

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

Issue 1162293008: Fix some lingering WebUI focus issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not more or less hacky, just hacky in a different way... Created 5 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="extension_command_list.js"> 5 <include src="extension_command_list.js">
6 6
7 cr.define('extensions', function() { 7 cr.define('extensions', function() {
8 'use strict'; 8 'use strict';
9 9
10 // The Extension Commands list object that will be used to show the commands 10 // The Extension Commands list object that will be used to show the commands
(...skipping 16 matching lines...) Expand all
27 */ 27 */
28 initializePage: function() { 28 initializePage: function() {
29 var overlay = $('overlay'); 29 var overlay = $('overlay');
30 cr.ui.overlay.setupOverlay(overlay); 30 cr.ui.overlay.setupOverlay(overlay);
31 cr.ui.overlay.globalInitialization(); 31 cr.ui.overlay.globalInitialization();
32 overlay.addEventListener('cancelOverlay', this.handleDismiss_.bind(this)); 32 overlay.addEventListener('cancelOverlay', this.handleDismiss_.bind(this));
33 33
34 this.extensionCommandList_ = new ExtensionCommandList( 34 this.extensionCommandList_ = new ExtensionCommandList(
35 /**@type {HTMLDivElement} */($('extension-command-list'))); 35 /**@type {HTMLDivElement} */($('extension-command-list')));
36 36
37 $('extension-commands-dismiss').addEventListener('click', 37 $('extension-commands-dismiss').addEventListener('click', function() {
38 this.handleDismiss_.bind(this)); 38 cr.dispatchSimpleEvent(overlay, 'cancelOverlay');
39 });
39 40
40 // The ExtensionList will update us with its data, so we don't need to 41 // The ExtensionList will update us with its data, so we don't need to
41 // handle that here. 42 // handle that here.
42 }, 43 },
43 44
44 /** 45 /**
45 * Handles a click on the dismiss button. 46 * Handles a click on the dismiss button.
46 * @param {Event} e The click event. 47 * @param {Event} e The click event.
47 */ 48 */
48 handleDismiss_: function(e) { 49 handleDismiss_: function(e) {
(...skipping 26 matching lines...) Expand all
75 $('no-commands').hidden = hasAnyCommands; 76 $('no-commands').hidden = hasAnyCommands;
76 overlay.extensionCommandList_.classList.toggle( 77 overlay.extensionCommandList_.classList.toggle(
77 'empty-extension-commands-list', !hasAnyCommands); 78 'empty-extension-commands-list', !hasAnyCommands);
78 }; 79 };
79 80
80 // Export 81 // Export
81 return { 82 return {
82 ExtensionCommandsOverlay: ExtensionCommandsOverlay 83 ExtensionCommandsOverlay: ExtensionCommandsOverlay
83 }; 84 };
84 }); 85 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698