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

Side by Side Diff: chrome/browser/resources/options/origin_resources_list.js

Issue 380893005: Add an option page for searching and managing resources and permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last pass. Created 6 years, 5 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
(Empty)
1 // Copyright 2014 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('options', function() {
6 /** @const */ List = cr.ui.List;
7 /** @const */ ListItem = cr.ui.ListItem;
8
9 function OriginListItem(origin) {
10 var el = cr.doc.createElement('div');
11 el.origin_ = origin;
12 el.__proto__ = OriginListItem.prototype;
13 el.decorate();
14 return el;
15 }
16
17 OriginListItem.prototype = {
18 __proto__: ListItem.prototype,
19
20 /** @override */
21 decorate: function() {
22 ListItem.prototype.decorate.call(this);
23
24 this.classList.add('deletable-item');
25
26 this.contentElement_ = this.ownerDocument.createElement('div');
27 this.appendChild(this.contentElement_);
28
29 var titleEl = this.ownerDocument.createElement('div');
30 titleEl.className = 'title favicon-cell weaktrl';
31 titleEl.textContent = this.origin_;
32 titleEl.style.backgroundImage = getFaviconImageSet(this.origin_);
33 this.contentElement_.appendChild(titleEl);
34 }
35 };
36
37 var OriginList = cr.ui.define('list');
38
39 OriginList.prototype = {
40 __proto__: List.prototype,
41
42 /** @override */
43 createItem: function(entry) {
44 return new OriginListItem(entry);
45 },
46 };
47
48 return {
49 OriginListItem: OriginListItem,
50 OriginList: OriginList,
51 };
52 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698