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

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

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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 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 ready: function() { 24 ready: function() {
25 this.addWebUIListener('onZoomLevelsChanged', 25 this.addWebUIListener(
26 this.onZoomLevelsChanged_.bind(this)); 26 'onZoomLevelsChanged', this.onZoomLevelsChanged_.bind(this));
27 this.browserProxy.fetchZoomLevels(); 27 this.browserProxy.fetchZoomLevels();
28 }, 28 },
29 29
30 /** 30 /**
31 * A handler for when zoom levels change. 31 * A handler for when zoom levels change.
32 * @param {!Array<ZoomLevelEntry>} sites The up to date list of sites and 32 * @param {!Array<ZoomLevelEntry>} sites The up to date list of sites and
33 * their zoom levels. 33 * their zoom levels.
34 */ 34 */
35 onZoomLevelsChanged_: function(sites) { 35 onZoomLevelsChanged_: function(sites) {
36 this.sites_ = sites; 36 this.sites_ = sites;
37 }, 37 },
38 38
39 /** 39 /**
40 * A handler for when a zoom level for a site is deleted. 40 * A handler for when a zoom level for a site is deleted.
41 * @param {!{model: !{index: number}}} event 41 * @param {!{model: !{index: number}}} event
42 * @private 42 * @private
43 */ 43 */
44 removeZoomLevel_: function(event) { 44 removeZoomLevel_: function(event) {
45 var site = this.sites_[event.model.index]; 45 var site = this.sites_[event.model.index];
46 this.browserProxy.removeZoomLevel(site.origin); 46 this.browserProxy.removeZoomLevel(site.origin);
47 }, 47 },
48 }); 48 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698