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

Side by Side Diff: chrome/browser/resources/settings/site_settings/protocol_handlers.js

Issue 2598893002: [MD settings] lighter weight initializer for protocol handler enabled messages (Closed)
Patch Set: review changes Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'protocol-handlers' is the polymer element for showing the 7 * 'protocol-handlers' is the polymer element for showing the
8 * protocol handlers category under Site Settings. 8 * protocol handlers category under Site Settings.
9 */ 9 */
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 actionMenuModel_: Object 57 actionMenuModel_: Object
58 }, 58 },
59 59
60 ready: function() { 60 ready: function() {
61 this.addWebUIListener('setHandlersEnabled', 61 this.addWebUIListener('setHandlersEnabled',
62 this.setHandlersEnabled_.bind(this)); 62 this.setHandlersEnabled_.bind(this));
63 this.addWebUIListener('setProtocolHandlers', 63 this.addWebUIListener('setProtocolHandlers',
64 this.setProtocolHandlers_.bind(this)); 64 this.setProtocolHandlers_.bind(this));
65 this.addWebUIListener('setIgnoredProtocolHandlers', 65 this.addWebUIListener('setIgnoredProtocolHandlers',
66 this.setIgnoredProtocolHandlers_.bind(this)); 66 this.setIgnoredProtocolHandlers_.bind(this));
67 this.browserProxy.initializeProtocolHandlerList(); 67 this.browserProxy.observeProtocolHandlers();
68 }, 68 },
69 69
70 /** 70 /**
71 * Obtains the description for the main toggle. 71 * Obtains the description for the main toggle.
72 * @param {boolean} categoryEnabled Whether the main toggle is enabled. 72 * @param {boolean} categoryEnabled Whether the main toggle is enabled.
73 * @return {string} The description to use. 73 * @return {string} The description to use.
74 * @private 74 * @private
75 */ 75 */
76 computeHandlersDescription_: function(categoryEnabled) { 76 computeHandlersDescription_: function(categoryEnabled) {
77 var setting = categoryEnabled ? 77 var setting = categoryEnabled ?
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 * @private 169 * @private
170 */ 170 */
171 showMenu_: function(event) { 171 showMenu_: function(event) {
172 this.actionMenuModel_ = event.model; 172 this.actionMenuModel_ = event.model;
173 /** @type {!CrActionMenuElement} */ ( 173 /** @type {!CrActionMenuElement} */ (
174 this.$$('dialog[is=cr-action-menu]')).showAt( 174 this.$$('dialog[is=cr-action-menu]')).showAt(
175 /** @type {!Element} */ ( 175 /** @type {!Element} */ (
176 Polymer.dom(/** @type {!Event} */ (event)).localTarget)); 176 Polymer.dom(/** @type {!Event} */ (event)).localTarget));
177 } 177 }
178 }); 178 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698