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

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

Issue 293063017: Updated to read remove all shown when the user searches for a cookie (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // CookiesView class: 10 // CookiesView class:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 chrome.send('updateCookieSearchResults', [filter]); 81 chrome.send('updateCookieSearchResults', [filter]);
82 } 82 }
83 }, 83 },
84 84
85 /** 85 /**
86 * Handles search query changes. 86 * Handles search query changes.
87 * @param {!Event} e The event object. 87 * @param {!Event} e The event object.
88 * @private 88 * @private
89 */ 89 */
90 handleSearchQueryChange_: function(e) { 90 handleSearchQueryChange_: function(e) {
91 var content = document.querySelector('.cookies-search-box').value.trim();
92 if (content) {
93 document.querySelector('.remove-all-cookies-button').innerHTML =
felt 2014/05/23 17:18:12 Instead of using innerHTML, can you use .value?
felt 2014/05/23 22:40:14 Radhika's response was:
94 loadTimeData.getString('remove_all_shown_cookie');
95 }
96 else {
97 document.querySelector('.remove-all-cookies-button').innerHTML =
98 loadTimeData.getString('remove_all_cookie');
99 }
91 if (this.queryDelayTimerId_) 100 if (this.queryDelayTimerId_)
92 window.clearTimeout(this.queryDelayTimerId_); 101 window.clearTimeout(this.queryDelayTimerId_);
93 102
94 this.queryDelayTimerId_ = window.setTimeout( 103 this.queryDelayTimerId_ = window.setTimeout(
95 this.searchCookie.bind(this), 500); 104 this.searchCookie.bind(this), 500);
96 }, 105 },
97 106
98 initialized_: false, 107 initialized_: false,
99 108
100 /** 109 /**
101 * Handler for OptionsPage's visible property change event. 110 * Handler for OptionsPage's visible property change event.
102 * @param {Event} e Property change event. 111 * @param {Event} e Property change event.
103 * @private 112 * @private
104 */ 113 */
105 handleVisibleChange_: function(e) { 114 handleVisibleChange_: function(e) {
106 if (!this.visible) 115 if (!this.visible)
107 return; 116 return;
108 117
109 chrome.send('reloadCookies'); 118 chrome.send('reloadCookies');
110
felt 2014/05/23 17:18:12 did you intentionally delete these lines?
111 if (!this.initialized_) { 119 if (!this.initialized_) {
112 this.initialized_ = true; 120 this.initialized_ = true;
113 this.searchCookie(); 121 this.searchCookie();
114 } else { 122 } else {
115 this.pageDiv.querySelector('.cookies-list').redraw(); 123 this.pageDiv.querySelector('.cookies-list').redraw();
116 } 124 }
117
118 this.pageDiv.querySelector('.cookies-search-box').focus(); 125 this.pageDiv.querySelector('.cookies-search-box').focus();
119 }, 126 },
120 }; 127 };
121 128
122 // CookiesViewHandler callbacks. 129 // CookiesViewHandler callbacks.
123 CookiesView.onTreeItemAdded = function(args) { 130 CookiesView.onTreeItemAdded = function(args) {
124 $('cookies-list').addByParentId(args[0], args[1], args[2]); 131 $('cookies-list').addByParentId(args[0], args[1], args[2]);
125 }; 132 };
126 133
127 CookiesView.onTreeItemRemoved = function(args) { 134 CookiesView.onTreeItemRemoved = function(args) {
128 $('cookies-list').removeByParentId(args[0], args[1], args[2]); 135 $('cookies-list').removeByParentId(args[0], args[1], args[2]);
129 }; 136 };
130 137
131 CookiesView.loadChildren = function(args) { 138 CookiesView.loadChildren = function(args) {
132 $('cookies-list').loadChildren(args[0], args[1]); 139 $('cookies-list').loadChildren(args[0], args[1]);
133 }; 140 };
134 141
135 // Export 142 // Export
136 return { 143 return {
137 CookiesView: CookiesView 144 CookiesView: CookiesView
138 }; 145 };
139 146
140 }); 147 });
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/webui/options/cookies_view_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698