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

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

Issue 2522303002: [MD Extensions] Add logic for opening the extension's home page (Closed)
Patch Set: add comment Created 4 years 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 2016 The Chromium Authors. All rights reserved. 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 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 'use strict'; 6 'use strict';
7 7
8 var DetailView = Polymer({ 8 var DetailView = Polymer({
9 is: 'extensions-detail-view', 9 is: 'extensions-detail-view',
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 * @private 45 * @private
46 */ 46 */
47 hasPermissions_: function() { 47 hasPermissions_: function() {
48 return this.data.permissions.length > 0; 48 return this.data.permissions.length > 0;
49 }, 49 },
50 50
51 /** 51 /**
52 * @return {boolean} 52 * @return {boolean}
53 * @private 53 * @private
54 */ 54 */
55 shouldShowHomepageButton_: function() {
56 // Note: we ignore |data.homePage.specified| - we use an extension's
57 // webstore entry as a homepage if the extension didn't explicitly specify
58 // a homepage. (|url| can still be unset in the case of unpacked
59 // extensions.)
60 return this.data.homePage.url.length > 0;
61 },
62
63 /**
64 * @return {boolean}
65 * @private
66 */
55 shouldShowOptionsButton_: function() { 67 shouldShowOptionsButton_: function() {
56 return !!this.data.optionsPage; 68 return !!this.data.optionsPage;
57 }, 69 },
58 70
59 /** 71 /**
60 * @return {boolean} 72 * @return {boolean}
61 * @private 73 * @private
62 */ 74 */
63 shouldShowOptionsSection_: function() { 75 shouldShowOptionsSection_: function() {
64 return this.data.incognitoAccess.isEnabled || 76 return this.data.incognitoAccess.isEnabled ||
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 118
107 /** @private */ 119 /** @private */
108 computeSourceString_: function() { 120 computeSourceString_: function() {
109 return extensions.getItemSourceString( 121 return extensions.getItemSourceString(
110 extensions.getItemSource(this.data)); 122 extensions.getItemSource(this.data));
111 } 123 }
112 }); 124 });
113 125
114 return {DetailView: DetailView}; 126 return {DetailView: DetailView};
115 }); 127 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698