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

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

Issue 2847963003: [MD settings] specify @override on created, ready, and attached (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « chrome/browser/resources/settings/site_settings/website_usage_private_api.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * 'zoom-levels' is the polymer element for showing the sites that are zoomed in 7 * 'zoom-levels' is the polymer element for showing the sites that are zoomed in
8 * or out. 8 * or out.
9 */ 9 */
10 10
11 Polymer({ 11 Polymer({
12 is: 'zoom-levels', 12 is: 'zoom-levels',
13 13
14 behaviors: [SiteSettingsBehavior, WebUIListenerBehavior], 14 behaviors: [SiteSettingsBehavior, WebUIListenerBehavior],
15 15
16 properties: { 16 properties: {
17 /** 17 /**
18 * Array of sites that are zoomed in or out. 18 * Array of sites that are zoomed in or out.
19 * @type {!Array<ZoomLevelEntry>} 19 * @type {!Array<ZoomLevelEntry>}
20 */ 20 */
21 sites_: Array, 21 sites_: Array,
22 }, 22 },
23 23
24 /** @override */
24 ready: function() { 25 ready: function() {
25 this.addWebUIListener('onZoomLevelsChanged', 26 this.addWebUIListener('onZoomLevelsChanged',
26 this.onZoomLevelsChanged_.bind(this)); 27 this.onZoomLevelsChanged_.bind(this));
27 this.browserProxy.fetchZoomLevels(); 28 this.browserProxy.fetchZoomLevels();
28 }, 29 },
29 30
30 /** 31 /**
31 * A handler for when zoom levels change. 32 * A handler for when zoom levels change.
32 * @param {!Array<ZoomLevelEntry>} sites The up to date list of sites and 33 * @param {!Array<ZoomLevelEntry>} sites The up to date list of sites and
33 * their zoom levels. 34 * their zoom levels.
34 */ 35 */
35 onZoomLevelsChanged_: function(sites) { 36 onZoomLevelsChanged_: function(sites) {
36 this.sites_ = sites; 37 this.sites_ = sites;
37 }, 38 },
38 39
39 /** 40 /**
40 * A handler for when a zoom level for a site is deleted. 41 * A handler for when a zoom level for a site is deleted.
41 * @param {!{model: !{index: number}}} event 42 * @param {!{model: !{index: number}}} event
42 * @private 43 * @private
43 */ 44 */
44 removeZoomLevel_: function(event) { 45 removeZoomLevel_: function(event) {
45 var site = this.sites_[event.model.index]; 46 var site = this.sites_[event.model.index];
46 this.browserProxy.removeZoomLevel(site.origin); 47 this.browserProxy.removeZoomLevel(site.origin);
47 }, 48 },
48 }); 49 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/website_usage_private_api.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698