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

Side by Side Diff: chrome/browser/resources/md_extensions/item.js

Issue 1920253002: Refactors parse_html_subset() into i18n_behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 cr.define('extensions', function() { 5 cr.define('extensions', function() {
6 /** @interface */ 6 /** @interface */
7 var ItemDelegate = function() {}; 7 var ItemDelegate = function() {};
8 8
9 ItemDelegate.prototype = { 9 ItemDelegate.prototype = {
10 /** @param {string} id */ 10 /** @param {string} id */
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 observers: [ 68 observers: [
69 'observeIdVisibility_(inDevMode, showingDetails_, data.id)', 69 'observeIdVisibility_(inDevMode, showingDetails_, data.id)',
70 ], 70 ],
71 71
72 /** @private */ 72 /** @private */
73 observeIdVisibility_: function(inDevMode, showingDetails, id) { 73 observeIdVisibility_: function(inDevMode, showingDetails, id) {
74 Polymer.dom.flush(); 74 Polymer.dom.flush();
75 var idElement = this.$$('#extension-id'); 75 var idElement = this.$$('#extension-id');
76 if (idElement) { 76 if (idElement) {
77 assert(this.data); 77 assert(this.data);
78 idElement.innerHTML = this.i18n('itemId', this.data.id); 78 idElement.innerHTML = this.i18n('itemId', [this.data.id]);
79 } 79 }
80 this.fire('extension-item-size-changed', {item: this.data}); 80 this.fire('extension-item-size-changed', {item: this.data});
81 }, 81 },
82 82
83 /** @private */ 83 /** @private */
84 onShowDetailsTap_: function() { 84 onShowDetailsTap_: function() {
85 this.showingDetails_ = !this.showingDetails_; 85 this.showingDetails_ = !this.showingDetails_;
86 }, 86 },
87 87
88 /** @private */ 88 /** @private */
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return this.data.blacklistText ? 'severe' : 'mild'; 184 return this.data.blacklistText ? 'severe' : 'mild';
185 }, 185 },
186 }); 186 });
187 187
188 return { 188 return {
189 Item: Item, 189 Item: Item,
190 ItemDelegate: ItemDelegate, 190 ItemDelegate: ItemDelegate,
191 }; 191 };
192 }); 192 });
193 193
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698