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

Side by Side Diff: chrome/browser/resources/settings/settings_ui/settings_ui.js

Issue 2465433002: Create implementation of the side panel using a dialog. (Closed)
Patch Set: nit Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * 'settings-ui' implements the UI for the Settings page. 7 * 'settings-ui' implements the UI for the Settings page.
8 * 8 *
9 * Example: 9 * Example:
10 * 10 *
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 settings.initializeRouteFromUrl(); 72 settings.initializeRouteFromUrl();
73 }, 73 },
74 74
75 /** 75 /**
76 * @override 76 * @override
77 * @suppress {es5Strict} Object literals cannot contain duplicate keys in ES5 77 * @suppress {es5Strict} Object literals cannot contain duplicate keys in ES5
78 * strict mode. 78 * strict mode.
79 */ 79 */
80 ready: function() { 80 ready: function() {
81 // Lazy-create the drawer the first time it is opened or swiped into view. 81 // Lazy-create the drawer the first time it is opened or swiped into view.
82 var drawer = assert(this.$$('app-drawer')); 82 listenOnce(this.$.drawer, 'open-changed', function() {
83 listenOnce(drawer, 'track opened-changed', function() {
84 this.$.drawerTemplate.if = true; 83 this.$.drawerTemplate.if = true;
85 }.bind(this)); 84 }.bind(this));
86 85
87 window.addEventListener('popstate', function(e) { 86 window.addEventListener('popstate', function(e) {
88 drawer.close(); 87 this.$.drawer.closeDrawer();
89 }.bind(this)); 88 }.bind(this));
90 89
91 if (loadTimeData.getBoolean('isGuest')) { 90 if (loadTimeData.getBoolean('isGuest')) {
92 this.pageVisibility_ = { 91 this.pageVisibility_ = {
93 people: false, 92 people: false,
94 onStartup: false, 93 onStartup: false,
95 reset: false, 94 reset: false,
96 <if expr="not chromeos"> 95 <if expr="not chromeos">
97 appearance: false, 96 appearance: false,
98 defaultBrowser: false, 97 defaultBrowser: false,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 query.length > 0 ? new URLSearchParams(`search=${query}`) : undefined, 180 query.length > 0 ? new URLSearchParams(`search=${query}`) : undefined,
182 /* removeSearch */ true); 181 /* removeSearch */ true);
183 }, 182 },
184 183
185 /** 184 /**
186 * @param {Event} event 185 * @param {Event} event
187 * @private 186 * @private
188 */ 187 */
189 onIronActivate_: function(event) { 188 onIronActivate_: function(event) {
190 if (event.detail.item.id != 'advancedPage') 189 if (event.detail.item.id != 'advancedPage')
191 this.$$('app-drawer').close(); 190 this.$.drawer.closeDrawer();
192 }, 191 },
193 192
194 /** @private */ 193 /** @private */
195 onMenuButtonTap_: function() { 194 onMenuButtonTap_: function() {
196 this.$$('app-drawer').toggle(); 195 this.$.drawer.toggle();
197 }, 196 },
198 197
199 /** @private */ 198 /** @private */
200 directionDelegateChanged_: function() { 199 directionDelegateChanged_: function() {
201 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? 200 this.$.drawer.align = this.directionDelegate.isRtl() ?
202 'right' : 'left'; 201 'right' : 'left';
203 }, 202 },
204 }); 203 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/settings_ui/settings_ui.html ('k') | chrome/test/data/webui/settings/rtl_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698