| 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 }, | 366 }, |
| 367 <if expr="not is_macosx"> | 367 <if expr="not is_macosx"> |
| 368 { | 368 { |
| 369 url: '/editDictionary', | 369 url: '/editDictionary', |
| 370 page: 'advanced', | 370 page: 'advanced', |
| 371 section: 'languages', | 371 section: 'languages', |
| 372 subpage: ['edit-dictionary'], | 372 subpage: ['edit-dictionary'], |
| 373 subpageTitles: ['editDictionaryPageTitle'], | 373 subpageTitles: ['editDictionaryPageTitle'], |
| 374 }, | 374 }, |
| 375 </if> | 375 </if> |
| 376 <if expr="chromeos"> |
| 377 { |
| 378 url: '/pointer-overlay', |
| 379 page: 'basic', |
| 380 section: 'device', |
| 381 subpage: ['touchpad'], |
| 382 subpageTitles: ['touchpadTitle'], |
| 383 }, |
| 384 </if> |
| 376 ], | 385 ], |
| 377 | 386 |
| 378 /** | 387 /** |
| 379 * Sets up a history popstate observer. | 388 * Sets up a history popstate observer. |
| 380 */ | 389 */ |
| 381 created: function() { | 390 created: function() { |
| 382 window.addEventListener('popstate', function(event) { | 391 window.addEventListener('popstate', function(event) { |
| 383 if (event.state && event.state.page) | 392 if (event.state && event.state.page) |
| 384 this.currentRoute = event.state; | 393 this.currentRoute = event.state; |
| 385 }.bind(this)); | 394 }.bind(this)); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 window.history.replaceState(historicState, document.title); | 440 window.history.replaceState(historicState, document.title); |
| 432 } | 441 } |
| 433 | 442 |
| 434 return; | 443 return; |
| 435 } | 444 } |
| 436 } | 445 } |
| 437 | 446 |
| 438 assertNotReached('Route not found: ' + JSON.stringify(newRoute)); | 447 assertNotReached('Route not found: ' + JSON.stringify(newRoute)); |
| 439 }, | 448 }, |
| 440 }); | 449 }); |
| OLD | NEW |