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

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

Issue 10830221: Ensure that cookies dialog is populated with new cookies on reload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options2/cookies_view_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 14 matching lines...) Expand all
25 __proto__: OptionsPage.prototype, 25 __proto__: OptionsPage.prototype,
26 26
27 /** 27 /**
28 * The timer id of the timer set on search query change events. 28 * The timer id of the timer set on search query change events.
29 * @type {number} 29 * @type {number}
30 * @private 30 * @private
31 */ 31 */
32 queryDelayTimerId_: 0, 32 queryDelayTimerId_: 0,
33 33
34 /** 34 /**
35 * The most recent search query, or null if the query is empty. 35 * The most recent search query, empty string if the query is empty.
36 * @type {?string} 36 * @type {string}
37 * @private 37 * @private
38 */ 38 */
39 lastQuery_: null, 39 lastQuery_: '',
battre 2012/08/08 18:00:59 I did this change, such that this.searchCookie();
40 40
41 initializePage: function() { 41 initializePage: function() {
42 OptionsPage.prototype.initializePage.call(this); 42 OptionsPage.prototype.initializePage.call(this);
43 43
44 this.pageDiv.querySelector('.cookies-search-box').addEventListener( 44 this.pageDiv.querySelector('.cookies-search-box').addEventListener(
45 'search', this.handleSearchQueryChange_.bind(this)); 45 'search', this.handleSearchQueryChange_.bind(this));
46 46
47 this.pageDiv.querySelector('.remove-all-cookies-button').onclick = 47 this.pageDiv.querySelector('.remove-all-cookies-button').onclick =
48 function(e) { 48 function(e) {
49 chrome.send('removeAllCookies'); 49 chrome.send('removeAllCookies');
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 * @private 99 * @private
100 */ 100 */
101 handleVisibleChange_: function(e) { 101 handleVisibleChange_: function(e) {
102 if (!this.visible) 102 if (!this.visible)
103 return; 103 return;
104 104
105 // Inform the CookiesViewHandler whether we are operating in regular 105 // Inform the CookiesViewHandler whether we are operating in regular
106 // cookies dialog or the apps one. 106 // cookies dialog or the apps one.
107 chrome.send('setViewContext', [this.isAppContext()]); 107 chrome.send('setViewContext', [this.isAppContext()]);
108 108
109 chrome.send('reloadCookies');
110
109 if (!this.initialized_) { 111 if (!this.initialized_) {
110 this.initialized_ = true; 112 this.initialized_ = true;
111 this.searchCookie(); 113 this.searchCookie();
112 } else { 114 } else {
113 this.pageDiv.querySelector('.cookies-list').redraw(); 115 this.pageDiv.querySelector('.cookies-list').redraw();
114 } 116 }
115 117
116 this.pageDiv.querySelector('.cookies-search-box').focus(); 118 this.pageDiv.querySelector('.cookies-search-box').focus();
117 }, 119 },
118 120
(...skipping 14 matching lines...) Expand all
133 CookiesView.loadChildren = function(args) { 135 CookiesView.loadChildren = function(args) {
134 $('cookies-list').loadChildren(args[0], args[1]); 136 $('cookies-list').loadChildren(args[0], args[1]);
135 }; 137 };
136 138
137 // Export 139 // Export
138 return { 140 return {
139 CookiesView: CookiesView 141 CookiesView: CookiesView
140 }; 142 };
141 143
142 }); 144 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options2/cookies_view_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698