Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // Closure compiler won't let this be declared inside cr.define(). | 5 // Closure compiler won't let this be declared inside cr.define(). |
| 6 /** @enum {string} */ | 6 /** @enum {string} */ |
| 7 var SourceType = { | 7 var SourceType = { |
| 8 WEBSTORE: 'webstore', | 8 WEBSTORE: 'webstore', |
| 9 POLICY: 'policy', | 9 POLICY: 'policy', |
| 10 SIDELOADED: 'sideloaded', | 10 SIDELOADED: 'sideloaded', |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 */ | 55 */ |
| 56 inspectItemView: assertNotReached, | 56 inspectItemView: assertNotReached, |
| 57 | 57 |
| 58 /** @param {string} id */ | 58 /** @param {string} id */ |
| 59 repairItem: assertNotReached, | 59 repairItem: assertNotReached, |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 var Item = Polymer({ | 62 var Item = Polymer({ |
| 63 is: 'extensions-item', | 63 is: 'extensions-item', |
| 64 | 64 |
| 65 behaviors: [I18nBehavior], | |
| 66 | |
| 65 properties: { | 67 properties: { |
| 66 // The item's delegate, or null. | 68 // The item's delegate, or null. |
| 67 delegate: { | 69 delegate: { |
| 68 type: Object, | 70 type: Object, |
| 69 }, | 71 }, |
| 70 | 72 |
| 71 // Whether or not dev mode is enabled. | 73 // Whether or not dev mode is enabled. |
| 72 inDevMode: { | 74 inDevMode: { |
| 73 type: Boolean, | 75 type: Boolean, |
| 74 value: false, | 76 value: false, |
| 75 }, | 77 }, |
| 76 | 78 |
| 77 // Whether or not the expanded view of the item is shown. | 79 // Whether or not the expanded view of the item is shown. |
|
michaelpg
2016/07/12 00:39:37
nit: add @private
Devlin
2016/07/12 20:30:18
Done.
| |
| 78 showingDetails_: { | 80 showingDetails_: { |
| 79 type: Boolean, | 81 type: Boolean, |
| 80 value: false, | 82 value: false, |
| 81 }, | 83 }, |
| 82 | 84 |
| 83 // The underlying ExtensionInfo itself. Public for use in declarative | 85 // The underlying ExtensionInfo itself. Public for use in declarative |
| 84 // bindings. | 86 // bindings. |
| 85 /** @type {chrome.developerPrivate.ExtensionInfo} */ | 87 /** @type {chrome.developerPrivate.ExtensionInfo} */ |
| 86 data: { | 88 data: { |
|
michaelpg
2016/07/12 00:39:37
public, then private
Devlin
2016/07/12 20:30:18
Done.
| |
| 87 type: Object, | 89 type: Object, |
| 88 }, | 90 }, |
| 89 }, | 91 }, |
| 90 | 92 |
| 91 behaviors: [ | |
| 92 I18nBehavior, | |
| 93 ], | |
| 94 | |
| 95 observers: [ | 93 observers: [ |
| 96 'observeIdVisibility_(inDevMode, showingDetails_, data.id)', | 94 'observeIdVisibility_(inDevMode, showingDetails_, data.id)', |
| 97 ], | 95 ], |
| 98 | 96 |
| 99 /** @private */ | 97 /** @private */ |
| 100 observeIdVisibility_: function(inDevMode, showingDetails, id) { | 98 observeIdVisibility_: function(inDevMode, showingDetails, id) { |
| 101 Polymer.dom.flush(); | 99 Polymer.dom.flush(); |
| 102 var idElement = this.$$('#extension-id'); | 100 var idElement = this.$$('#extension-id'); |
| 103 if (idElement) { | 101 if (idElement) { |
| 104 assert(this.data); | 102 assert(this.data); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 return this.data.blacklistText ? 'severe' : 'mild'; | 249 return this.data.blacklistText ? 'severe' : 'mild'; |
| 252 }, | 250 }, |
| 253 }); | 251 }); |
| 254 | 252 |
| 255 return { | 253 return { |
| 256 Item: Item, | 254 Item: Item, |
| 257 ItemDelegate: ItemDelegate, | 255 ItemDelegate: ItemDelegate, |
| 258 }; | 256 }; |
| 259 }); | 257 }); |
| 260 | 258 |
| OLD | NEW |