| Index: chrome/browser/resources/options2/cookies_view.js
|
| diff --git a/chrome/browser/resources/options2/cookies_view.js b/chrome/browser/resources/options2/cookies_view.js
|
| index 50a58afa6f0b636fe40c0e34991df3809fa19b4b..2e04f4d0a8eaa3519ce33cdfed425748f6a32b59 100644
|
| --- a/chrome/browser/resources/options2/cookies_view.js
|
| +++ b/chrome/browser/resources/options2/cookies_view.js
|
| @@ -41,19 +41,20 @@ cr.define('options', function() {
|
| initializePage: function() {
|
| OptionsPage.prototype.initializePage.call(this);
|
|
|
| - $('cookies-search-box').addEventListener('search',
|
| - this.handleSearchQueryChange_.bind(this));
|
| + this.pageDiv.querySelector('.cookies-search-box').addEventListener(
|
| + 'search', this.handleSearchQueryChange_.bind(this));
|
|
|
| - $('remove-all-cookies-button').onclick = function(e) {
|
| - chrome.send('removeAllCookies');
|
| - };
|
| + this.pageDiv.querySelector('.remove-all-cookies-button').onclick =
|
| + function(e) {
|
| + chrome.send('removeAllCookies');
|
| + };
|
|
|
| - var cookiesList = $('cookies-list');
|
| + var cookiesList = this.pageDiv.querySelector('.cookies-list');
|
| options.CookiesList.decorate(cookiesList);
|
|
|
| this.addEventListener('visibleChange', this.handleVisibleChange_);
|
|
|
| - $('cookies-view-overlay-confirm').onclick =
|
| + this.pageDiv.querySelector('.cookies-view-overlay-confirm').onclick =
|
| OptionsPage.closeOverlay.bind(OptionsPage);
|
| },
|
|
|
| @@ -62,7 +63,7 @@ cr.define('options', function() {
|
| * @inheritDoc
|
| */
|
| didShowPage: function() {
|
| - $('cookies-search-box').value = '';
|
| + this.pageDiv.querySelector('.cookies-search-box').value = '';
|
| },
|
|
|
| /**
|
| @@ -70,7 +71,7 @@ cr.define('options', function() {
|
| */
|
| searchCookie: function() {
|
| this.queryDelayTimerId_ = 0;
|
| - var filter = $('cookies-search-box').value;
|
| + var filter = this.pageDiv.querySelector('.cookies-search-box').value;
|
| if (this.lastQuery_ != filter) {
|
| this.lastQuery_ = filter;
|
| chrome.send('updateCookieSearchResults', [filter]);
|
| @@ -101,14 +102,22 @@ cr.define('options', function() {
|
| if (!this.visible)
|
| return;
|
|
|
| + // Inform the CookiesViewHandler whether we are operating in regular
|
| + // cookies dialog or the apps one.
|
| + chrome.send('setViewContext', [this.isAppContext()]);
|
| +
|
| if (!this.initialized_) {
|
| this.initialized_ = true;
|
| this.searchCookie();
|
| } else {
|
| - $('cookies-list').redraw();
|
| + this.pageDiv.querySelector('.cookies-list').redraw();
|
| }
|
|
|
| - $('cookies-search-box').focus();
|
| + this.pageDiv.querySelector('.cookies-search-box').focus();
|
| + },
|
| +
|
| + isAppContext: function() {
|
| + return false;
|
| },
|
| };
|
|
|
|
|