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

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

Issue 22298002: Don't close cookies view on search enter. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/cookies_view_browsertest.js » ('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 23 matching lines...) Expand all
34 /** 34 /**
35 * The most recent search query, empty string 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_: '', 39 lastQuery_: '',
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 var searchBox = this.pageDiv.querySelector('.cookies-search-box');
45 searchBox.addEventListener(
45 'search', this.handleSearchQueryChange_.bind(this)); 46 'search', this.handleSearchQueryChange_.bind(this));
47 searchBox.onkeydown = function(e) {
48 // Prevent the overlay from handling this event.
49 if (e.keyIdentifier == 'Enter')
50 e.stopPropagation();
51 };
46 52
47 this.pageDiv.querySelector('.remove-all-cookies-button').onclick = 53 this.pageDiv.querySelector('.remove-all-cookies-button').onclick =
48 function(e) { 54 function(e) {
49 chrome.send('removeAllCookies'); 55 chrome.send('removeAllCookies');
50 }; 56 };
51 57
52 var cookiesList = this.pageDiv.querySelector('.cookies-list'); 58 var cookiesList = this.pageDiv.querySelector('.cookies-list');
53 options.CookiesList.decorate(cookiesList); 59 options.CookiesList.decorate(cookiesList);
54 60
55 this.addEventListener('visibleChange', this.handleVisibleChange_); 61 this.addEventListener('visibleChange', this.handleVisibleChange_);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 CookiesView.loadChildren = function(args) { 131 CookiesView.loadChildren = function(args) {
126 $('cookies-list').loadChildren(args[0], args[1]); 132 $('cookies-list').loadChildren(args[0], args[1]);
127 }; 133 };
128 134
129 // Export 135 // Export
130 return { 136 return {
131 CookiesView: CookiesView 137 CookiesView: CookiesView
132 }; 138 };
133 139
134 }); 140 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/cookies_view_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698