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

Unified Diff: chrome/browser/resources/md_extensions/detail_view.js

Issue 1913353002: [MD Extensions] Add a details subpage, move to one list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dan's 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_extensions/detail_view.js
diff --git a/chrome/browser/resources/md_extensions/detail_view.js b/chrome/browser/resources/md_extensions/detail_view.js
new file mode 100644
index 0000000000000000000000000000000000000000..50816a786149da06a6ded2f8aecd70c1ac099bac
--- /dev/null
+++ b/chrome/browser/resources/md_extensions/detail_view.js
@@ -0,0 +1,65 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('extensions', function() {
+ 'use strict';
+
+ var DetailView = Polymer({
+ is: 'extensions-detail-view',
+
+ behaviors: [Polymer.NeonAnimatableBehavior, I18nBehavior],
Devlin 2016/04/26 17:24:19 I'm getting closure warnings about NeonAnimatableB
+
+ properties: {
+ animationConfig: {
+ type: Object,
+ /** @suppress {checkTypes} Compiler doesn't recognize this.$.main. */
Devlin 2016/04/26 17:24:19 :(
+ value: function() {
+ return {
+ entry: [{
+ name: 'hero-animation',
+ id: 'hero',
+ toPage: this
+ }],
+ exit: [{
+ name: 'scale-down-animation',
+ node: this.$.main,
+ transformOrigin: '50% 50%',
+ axis: 'y'
+ }],
+ };
+ },
+ },
+
+ /**
+ * The underlying ExtensionInfo for the details being displayed.
+ * @type {chrome.developerPrivate.ExtensionInfo}
+ */
+ data: {
+ type: Object,
+ }
+ },
+
+ ready: function() {
+ this.sharedElements = {hero: this.$.main};
+ },
+
+ /** @private */
+ onCloseButtonClick_: function() {
+ this.fire('close');
+ },
+
+ /** @private */
+ hasDependentExtensions_: function() {
+ return this.data.dependentExtensions.length > 0;
+ },
+
+ /** @private */
+ computeOptionsSectionShown_: function() {
+ // TODO(devlin): Also include run on all urls, file access, etc.
+ return this.data.incognitoAccess.isEnabled;
+ },
+ });
+
+ return {DetailView: DetailView};
+});

Powered by Google App Engine
This is Rietveld 408576698