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

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: latest master 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..2af421acbc8e61a774918fb082d6efce398fa975
--- /dev/null
+++ b/chrome/browser/resources/md_extensions/detail_view.js
@@ -0,0 +1,71 @@
+// 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],
+
+ properties: {
+ animationConfig: {
+ type: Object,
+ /** @suppress {checkTypes} Compiler doesn't recognize this.$.main. */
+ 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');
+ },
+
+ /**
+ * @return {boolean}
+ * @private
+ */
+ hasDependentExtensions_: function() {
+ return this.data.dependentExtensions.length > 0;
+ },
+
+ /**
+ * @return {boolean}
+ * @private
+ */
+ shouldShowOptionsSection_: function() {
+ // TODO(devlin): Also include run on all urls, file access, etc.
+ return this.data.incognitoAccess.isEnabled;
+ },
+ });
+
+ return {DetailView: DetailView};
+});
« no previous file with comments | « chrome/browser/resources/md_extensions/detail_view.html ('k') | chrome/browser/resources/md_extensions/item.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698