| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |