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

Side by Side Diff: chrome/browser/resources/settings/settings_page/settings_router.js

Issue 1707613002: MD Settings: Start device page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments, rebase Created 4 years, 10 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 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-router' is a simple router for settings. Its responsibilities: 7 * 'settings-router' is a simple router for settings. Its responsibilities:
8 * - Update the URL when the routing state changes. 8 * - Update the URL when the routing state changes.
9 * - Initialize the routing state with the initial URL. 9 * - Initialize the routing state with the initial URL.
10 * - Process and validate all routing state changes. 10 * - Process and validate all routing state changes.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 }, 381 },
382 <if expr="not is_macosx"> 382 <if expr="not is_macosx">
383 { 383 {
384 url: '/editDictionary', 384 url: '/editDictionary',
385 page: 'advanced', 385 page: 'advanced',
386 section: 'languages', 386 section: 'languages',
387 subpage: ['edit-dictionary'], 387 subpage: ['edit-dictionary'],
388 subpageTitles: ['editDictionaryPageTitle'], 388 subpageTitles: ['editDictionaryPageTitle'],
389 }, 389 },
390 </if> 390 </if>
391 <if expr="chromeos">
392 {
393 url: '/pointer-overlay',
394 page: 'basic',
395 section: 'device',
396 subpage: ['touchpad'],
397 subpageTitles: ['touchpadTitle'],
398 },
399 </if>
391 ], 400 ],
392 401
393 /** 402 /**
394 * Sets up a history popstate observer. 403 * Sets up a history popstate observer.
395 */ 404 */
396 created: function() { 405 created: function() {
397 window.addEventListener('popstate', function(event) { 406 window.addEventListener('popstate', function(event) {
398 if (event.state && event.state.page) 407 if (event.state && event.state.page)
399 this.currentRoute = event.state; 408 this.currentRoute = event.state;
400 }.bind(this)); 409 }.bind(this));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 window.history.replaceState(historicState, document.title); 455 window.history.replaceState(historicState, document.title);
447 } 456 }
448 457
449 return; 458 return;
450 } 459 }
451 } 460 }
452 461
453 assertNotReached('Route not found: ' + JSON.stringify(newRoute)); 462 assertNotReached('Route not found: ' + JSON.stringify(newRoute));
454 }, 463 },
455 }); 464 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698