| OLD | NEW |
| 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 Page = cr.ui.pageManager.Page; | 7 var Page = cr.ui.pageManager.Page; |
| 8 var PageManager = cr.ui.pageManager.PageManager; | 8 var PageManager = cr.ui.pageManager.PageManager; |
| 9 | 9 |
| 10 ///////////////////////////////////////////////////////////////////////////// | 10 ///////////////////////////////////////////////////////////////////////////// |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 /** @override */ | 43 /** @override */ |
| 44 initializePage: function() { | 44 initializePage: function() { |
| 45 Page.prototype.initializePage.call(this); | 45 Page.prototype.initializePage.call(this); |
| 46 | 46 |
| 47 var searchBox = this.pageDiv.querySelector('.cookies-search-box'); | 47 var searchBox = this.pageDiv.querySelector('.cookies-search-box'); |
| 48 searchBox.addEventListener( | 48 searchBox.addEventListener( |
| 49 'search', this.handleSearchQueryChange_.bind(this)); | 49 'search', this.handleSearchQueryChange_.bind(this)); |
| 50 searchBox.onkeydown = function(e) { | 50 searchBox.onkeydown = function(e) { |
| 51 // Prevent the overlay from handling this event. | 51 // Prevent the overlay from handling this event. |
| 52 if (e.keyIdentifier == 'Enter') | 52 if (e.key == 'Enter') |
| 53 e.stopPropagation(); | 53 e.stopPropagation(); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 this.pageDiv.querySelector('.remove-all-cookies-button').onclick = | 56 this.pageDiv.querySelector('.remove-all-cookies-button').onclick = |
| 57 function(e) { | 57 function(e) { |
| 58 chrome.send('removeAllCookies'); | 58 chrome.send('removeAllCookies'); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 var cookiesList = this.pageDiv.querySelector('.cookies-list'); | 61 var cookiesList = this.pageDiv.querySelector('.cookies-list'); |
| 62 options.CookiesList.decorate(cookiesList); | 62 options.CookiesList.decorate(cookiesList); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 CookiesView.loadChildren = function(args) { | 138 CookiesView.loadChildren = function(args) { |
| 139 $('cookies-list').loadChildren(args[0], args[1]); | 139 $('cookies-list').loadChildren(args[0], args[1]); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 // Export | 142 // Export |
| 143 return { | 143 return { |
| 144 CookiesView: CookiesView | 144 CookiesView: CookiesView |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 }); | 147 }); |
| OLD | NEW |