OLD | NEW |
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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 }, | 389 }, |
390 </if> | 390 </if> |
391 <if expr="chromeos"> | 391 <if expr="chromeos"> |
392 { | 392 { |
393 url: '/pointer-overlay', | 393 url: '/pointer-overlay', |
394 page: 'basic', | 394 page: 'basic', |
395 section: 'device', | 395 section: 'device', |
396 subpage: ['touchpad'], | 396 subpage: ['touchpad'], |
397 subpageTitles: ['touchpadTitle'], | 397 subpageTitles: ['touchpadTitle'], |
398 }, | 398 }, |
| 399 { |
| 400 url: '/keyboard-overlay', |
| 401 page: 'basic', |
| 402 section: 'device', |
| 403 subpage: ['keyboard'], |
| 404 subpageTitles: ['keyboardTitle'], |
| 405 }, |
399 </if> | 406 </if> |
400 ], | 407 ], |
401 | 408 |
402 /** | 409 /** |
403 * Sets up a history popstate observer. | 410 * Sets up a history popstate observer. |
404 */ | 411 */ |
405 created: function() { | 412 created: function() { |
406 window.addEventListener('popstate', function(event) { | 413 window.addEventListener('popstate', function(event) { |
407 if (event.state && event.state.page) | 414 if (event.state && event.state.page) |
408 this.currentRoute = event.state; | 415 this.currentRoute = event.state; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 window.history.replaceState(historicState, document.title); | 462 window.history.replaceState(historicState, document.title); |
456 } | 463 } |
457 | 464 |
458 return; | 465 return; |
459 } | 466 } |
460 } | 467 } |
461 | 468 |
462 assertNotReached('Route not found: ' + JSON.stringify(newRoute)); | 469 assertNotReached('Route not found: ' + JSON.stringify(newRoute)); |
463 }, | 470 }, |
464 }); | 471 }); |
OLD | NEW |