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

Side by Side Diff: chrome/browser/resources/settings/site_settings/website_usage_private_api.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
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 (function() { 5 (function() {
6 'use strict'; 6 'use strict';
7 7
8 Polymer({ 8 Polymer({
9 is: 'website-usage-private-api', 9 is: 'website-usage-private-api',
10 10
11 properties: { 11 properties: {
12 /** 12 /**
13 * The amount of data used by the given website. 13 * The amount of data used by the given website.
14 */ 14 */
15 websiteDataUsage: { 15 websiteDataUsage: {
16 type: String, 16 type: String,
17 notify: true, 17 notify: true,
18 }, 18 },
19 19
20 /** 20 /**
21 * The type of data used by the given website. 21 * The type of data used by the given website.
22 */ 22 */
23 websiteStorageType: { 23 websiteStorageType: {
24 type: Number, 24 type: Number,
25 notify: true, 25 notify: true,
26 }, 26 },
27 }, 27 },
28 28
29 /** @override */
29 attached: function() { 30 attached: function() {
30 settings.WebsiteUsagePrivateApi.websiteUsagePolymerInstance = this; 31 settings.WebsiteUsagePrivateApi.websiteUsagePolymerInstance = this;
31 }, 32 },
32 33
33 /** @param {string} host */ 34 /** @param {string} host */
34 fetchUsageTotal: function(host) { 35 fetchUsageTotal: function(host) {
35 settings.WebsiteUsagePrivateApi.fetchUsageTotal(host); 36 settings.WebsiteUsagePrivateApi.fetchUsageTotal(host);
36 }, 37 },
37 38
38 /** 39 /**
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 instance.notifyUsageDeleted(origin); 116 instance.notifyUsageDeleted(origin);
116 }; 117 };
117 118
118 return { websiteUsagePolymerInstance: websiteUsagePolymerInstance, 119 return { websiteUsagePolymerInstance: websiteUsagePolymerInstance,
119 fetchUsageTotal: fetchUsageTotal, 120 fetchUsageTotal: fetchUsageTotal,
120 returnUsageTotal: returnUsageTotal, 121 returnUsageTotal: returnUsageTotal,
121 clearUsage: clearUsage, 122 clearUsage: clearUsage,
122 onUsageCleared: onUsageCleared, }; 123 onUsageCleared: onUsageCleared, };
123 }); 124 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698