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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_data.js

Issue 2817903004: MD Settings: Focus cookies search field when exiting cookie details subpage. (Closed)
Patch Set: Simulate pop state in test. Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'site-data' handles showing the local storage summary list for all sites. 7 * 'site-data' handles showing the local storage summary list for all sites.
8 */ 8 */
9 9
10 /** 10 /**
(...skipping 16 matching lines...) Expand all
27 * The current filter applied to the cookie data list. 27 * The current filter applied to the cookie data list.
28 * @private 28 * @private
29 */ 29 */
30 filterString_: { 30 filterString_: {
31 type: String, 31 type: String,
32 value: '', 32 value: '',
33 }, 33 },
34 34
35 /** @private */ 35 /** @private */
36 confirmationDeleteMsg_: String, 36 confirmationDeleteMsg_: String,
37
38 /** @type {!Map<string, string>} */
39 focusConfig: {
40 type: Object,
41 observer: 'focusConfigChanged_',
42 },
43 },
44
45 /**
46 * @param {!Map<string, string>} newConfig
47 * @param {?Map<string, string>} oldConfig
48 * @private
49 */
50 focusConfigChanged_: function(newConfig, oldConfig) {
51 // focusConfig is set only once on the parent, so this observer should only
52 // fire once.
53 assert(!oldConfig);
54
55 // Populate the |focusConfig| map of the parent <settings-animated-pages>
56 // element, with additional entries that correspond to subpage trigger
57 // elements residing in this element's Shadow DOM.
58 this.focusConfig.set(
59 settings.Route.SITE_SETTINGS_DATA_DETAILS.path,
60 '* /deep/ #filter /deep/ #searchInput');
37 }, 61 },
38 62
39 /** @override */ 63 /** @override */
40 ready: function() { 64 ready: function() {
41 this.loadCookies(); 65 this.loadCookies();
42 }, 66 },
43 67
44 /** 68 /**
45 * A filter function for the list. 69 * A filter function for the list.
46 * @param {!CookieDataSummaryItem} item The item to possibly filter out. 70 * @param {!CookieDataSummaryItem} item The item to possibly filter out.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 156
133 /** 157 /**
134 * @param {!{model: !{item: CookieDataSummaryItem}}} event 158 * @param {!{model: !{item: CookieDataSummaryItem}}} event
135 * @private 159 * @private
136 */ 160 */
137 onSiteTap_: function(event) { 161 onSiteTap_: function(event) {
138 settings.navigateTo(settings.Route.SITE_SETTINGS_DATA_DETAILS, 162 settings.navigateTo(settings.Route.SITE_SETTINGS_DATA_DETAILS,
139 new URLSearchParams('site=' + event.model.item.site)); 163 new URLSearchParams('site=' + event.model.item.site));
140 }, 164 },
141 }); 165 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698