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

Side by Side Diff: chrome/browser/resources/md_extensions/item.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, 7 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 unified diff | Download patch
OLDNEW
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 cr.define('extensions', function() { 5 cr.define('extensions', function() {
6 /** @interface */ 6 /** @interface */
7 var ItemDelegate = function() {}; 7 var ItemDelegate = function() {};
8 8
9 ItemDelegate.prototype = { 9 ItemDelegate.prototype = {
10 /** @param {string} id */ 10 /** @param {string} id */
11 deleteItem: assertNotReached, 11 deleteItem: assertNotReached,
12 12
13 /** 13 /**
14 * @param {string} id 14 * @param {string} id
15 * @param {boolean} isEnabled 15 * @param {boolean} isEnabled
16 */ 16 */
17 setItemEnabled: assertNotReached, 17 setItemEnabled: assertNotReached,
18 18
19 /** @param {string} id */
20 showItemDetails: assertNotReached,
21
22 /** 19 /**
23 * @param {string} id 20 * @param {string} id
24 * @param {boolean} isAllowedIncognito 21 * @param {boolean} isAllowedIncognito
25 */ 22 */
26 setItemAllowedIncognito: assertNotReached, 23 setItemAllowedIncognito: assertNotReached,
27 24
28 /** 25 /**
29 * @param {string} id, 26 * @param {string} id,
30 * @param {chrome.developerPrivate.ExtensionView} view 27 * @param {chrome.developerPrivate.ExtensionView} view
31 */ 28 */
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 this.delegate.deleteItem(this.data.id); 87 this.delegate.deleteItem(this.data.id);
91 }, 88 },
92 89
93 /** @private */ 90 /** @private */
94 onEnableChange_: function() { 91 onEnableChange_: function() {
95 this.delegate.setItemEnabled(this.data.id, this.$.enabled.checked); 92 this.delegate.setItemEnabled(this.data.id, this.$.enabled.checked);
96 }, 93 },
97 94
98 /** @private */ 95 /** @private */
99 onDetailsTap_: function() { 96 onDetailsTap_: function() {
100 this.delegate.showItemDetails(this.data.id); 97 this.fire('extension-item-show-details', {element: this});
101 }, 98 },
102 99
103 /** @private */ 100 /** @private */
104 onAllowIncognitoChange_: function() { 101 onAllowIncognitoChange_: function() {
105 this.delegate.setItemAllowedIncognito( 102 this.delegate.setItemAllowedIncognito(
106 this.data.id, this.$$('#allow-incognito').checked); 103 this.data.id, this.$$('#allow-incognito').checked);
107 }, 104 },
108 105
109 /** 106 /**
110 * @param {!{model: !{item: !chrome.developerPrivate.ExtensionView}}} e 107 * @param {!{model: !{item: !chrome.developerPrivate.ExtensionView}}} e
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return this.data.blacklistText ? 'severe' : 'mild'; 181 return this.data.blacklistText ? 'severe' : 'mild';
185 }, 182 },
186 }); 183 });
187 184
188 return { 185 return {
189 Item: Item, 186 Item: Item,
190 ItemDelegate: ItemDelegate, 187 ItemDelegate: ItemDelegate,
191 }; 188 };
192 }); 189 });
193 190
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_extensions/detail_view.js ('k') | chrome/browser/resources/md_extensions/item_list.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698