| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 cr.define('extensions', function() { |
| 6 'use strict'; |
| 7 |
| 8 var DetailView = Polymer({ |
| 9 is: 'extensions-detail-view', |
| 10 |
| 11 behaviors: [Polymer.NeonAnimatableBehavior, I18nBehavior], |
| 12 |
| 13 properties: { |
| 14 animationConfig: { |
| 15 type: Object, |
| 16 /** @suppress {checkTypes} Compiler doesn't recognize this.$.main. */ |
| 17 value: function() { |
| 18 return { |
| 19 entry: [{ |
| 20 name: 'hero-animation', |
| 21 id: 'hero', |
| 22 toPage: this |
| 23 }], |
| 24 exit: [{ |
| 25 name: 'scale-down-animation', |
| 26 node: this.$.main, |
| 27 transformOrigin: '50% 50%', |
| 28 axis: 'y' |
| 29 }], |
| 30 }; |
| 31 }, |
| 32 }, |
| 33 |
| 34 /** |
| 35 * The underlying ExtensionInfo for the details being displayed. |
| 36 * @type {chrome.developerPrivate.ExtensionInfo} |
| 37 */ |
| 38 data: { |
| 39 type: Object, |
| 40 } |
| 41 }, |
| 42 |
| 43 ready: function() { |
| 44 this.sharedElements = {hero: this.$.main}; |
| 45 }, |
| 46 |
| 47 /** @private */ |
| 48 onCloseButtonClick_: function() { |
| 49 this.fire('close'); |
| 50 }, |
| 51 |
| 52 /** |
| 53 * @return {boolean} |
| 54 * @private |
| 55 */ |
| 56 hasDependentExtensions_: function() { |
| 57 return this.data.dependentExtensions.length > 0; |
| 58 }, |
| 59 |
| 60 /** |
| 61 * @return {boolean} |
| 62 * @private |
| 63 */ |
| 64 shouldShowOptionsSection_: function() { |
| 65 // TODO(devlin): Also include run on all urls, file access, etc. |
| 66 return this.data.incognitoAccess.isEnabled; |
| 67 }, |
| 68 }); |
| 69 |
| 70 return {DetailView: DetailView}; |
| 71 }); |
| OLD | NEW |