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

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

Issue 2184893002: Settings Router Refactor: Remove route.page legacy property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0217-settings-refactor-settings-menu
Patch Set: Created 4 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
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 'settings-device-page' is the settings page for device and 6 * @fileoverview 'settings-device-page' is the settings page for device and
7 * peripheral settings. 7 * peripheral settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-device-page', 10 is: 'settings-device-page',
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 * @private 122 * @private
123 */ 123 */
124 checkPointerSubpage_: function() { 124 checkPointerSubpage_: function() {
125 if (!this.hasMouse_ && !this.hasTouchpad_ && 125 if (!this.hasMouse_ && !this.hasTouchpad_ &&
126 this.isCurrentRouteOnPointersPage_()) { 126 this.isCurrentRouteOnPointersPage_()) {
127 this.$.pages.fire('subpage-back'); 127 this.$.pages.fire('subpage-back');
128 } 128 }
129 }, 129 },
130 130
131 /** 131 /**
132 * TODO(michaelpg): create generic fn for this and isCurrentRouteOnSyncPage_. 132 * TODO(michaelpg): create generic fn for this and isCurrentRouteOnSyncPage_.
michaelpg 2016/07/28 23:22:31 see next comment: delete isCurrentRouteOnSyncPage_
tommycli 2016/07/29 00:03:35 Done.
133 * @return {boolean} Whether the current route shows the pointers page. 133 * @return {boolean} Whether the current route shows the pointers page.
134 * @private 134 * @private
135 */ 135 */
136 isCurrentRouteOnPointersPage_: function() { 136 isCurrentRouteOnPointersPage_: function() {
137 return this.currentRoute && 137 return this.currentRoute == settings.Route.POINTERS;
michaelpg 2016/07/28 23:22:31 meh, optionally: just inline this -- it's literall
tommycli 2016/07/29 00:03:35 Done.
138 this.currentRoute.page == 'basic' &&
139 this.currentRoute.section == 'device' &&
140 this.currentRoute.subpage.length == 1 &&
141 this.currentRoute.subpage[0] == 'pointers';
142 }, 138 },
143 }); 139 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698