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

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

Issue 475193002: Add a single site view page to view and modify content settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 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 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('options', function() { 5 cr.define('options', function() {
6 /** @const */ List = cr.ui.List; 6 /** @const */ List = cr.ui.List;
7 /** @const */ ListItem = cr.ui.ListItem; 7 /** @const */ ListItem = cr.ui.ListItem;
8 8
9 /** 9 /**
10 * Creates a new list item for the origin's data. 10 * Creates a new list item for the origin's data.
(...skipping 16 matching lines...) Expand all
27 decorate: function() { 27 decorate: function() {
28 ListItem.prototype.decorate.call(this); 28 ListItem.prototype.decorate.call(this);
29 29
30 this.className = 'deletable-item origin-list-item'; 30 this.className = 'deletable-item origin-list-item';
31 this.contentElement_ = this.ownerDocument.createElement('div'); 31 this.contentElement_ = this.ownerDocument.createElement('div');
32 this.appendChild(this.contentElement_); 32 this.appendChild(this.contentElement_);
33 33
34 var titleEl = this.ownerDocument.createElement('div'); 34 var titleEl = this.ownerDocument.createElement('div');
35 titleEl.className = 'title favicon-cell weaktrl'; 35 titleEl.className = 'title favicon-cell weaktrl';
36 titleEl.textContent = this.origin_; 36 titleEl.textContent = this.origin_;
37 titleEl.originPattern = this.origin_;
37 titleEl.style.backgroundImage = getFaviconImageSet(this.origin_); 38 titleEl.style.backgroundImage = getFaviconImageSet(this.origin_);
38 this.contentElement_.appendChild(titleEl); 39 this.contentElement_.appendChild(titleEl);
39 40
41 this.contentElement_.onclick = function() {
42 chrome.send('maybeShowEditPage', [titleEl.originPattern]);
43 };
44
40 if (this.usageString_) { 45 if (this.usageString_) {
41 var usageEl = this.ownerDocument.createElement('span'); 46 var usageEl = this.ownerDocument.createElement('span');
42 usageEl.className = 'local-storage-usage'; 47 usageEl.className = 'local-storage-usage';
43 usageEl.textContent = this.usageString_; 48 usageEl.textContent = this.usageString_;
44 this.appendChild(usageEl); 49 this.appendChild(usageEl);
45 } 50 }
46 } 51 }
47 }; 52 };
48 53
49 var OriginList = cr.ui.define('list'); 54 var OriginList = cr.ui.define('list');
50 55
51 OriginList.prototype = { 56 OriginList.prototype = {
52 __proto__: List.prototype, 57 __proto__: List.prototype,
53 58
54 /** @override */ 59 /** @override */
55 createItem: function(entry) { 60 createItem: function(entry) {
56 return new OriginListItem(entry); 61 return new OriginListItem(entry);
57 }, 62 },
58 }; 63 };
59 64
60 return { 65 return {
61 OriginListItem: OriginListItem, 66 OriginListItem: OriginListItem,
62 OriginList: OriginList, 67 OriginList: OriginList,
63 }; 68 };
64 }); 69 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/options_bundle.js ('k') | chrome/browser/resources/options/website_settings.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698