| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 ///////////////////////////////////////////////////////////////////////////// | 6 ///////////////////////////////////////////////////////////////////////////// |
| 7 // OptionsPage class: | 7 // OptionsPage class: |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Base class for options page. | 10 * Base class for options page. |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 var containerId = 'subpage-sheet-container-' + nestingLevel; | 491 var containerId = 'subpage-sheet-container-' + nestingLevel; |
| 492 $(containerId).classList.remove('hidden'); | 492 $(containerId).classList.remove('hidden'); |
| 493 } | 493 } |
| 494 | 494 |
| 495 // The managed prefs banner is global, so after any visibility change | 495 // The managed prefs banner is global, so after any visibility change |
| 496 // update it based on the topmost page, not necessarily this page. | 496 // update it based on the topmost page, not necessarily this page. |
| 497 // (e.g., if an ancestor is made visible after a child). | 497 // (e.g., if an ancestor is made visible after a child). |
| 498 OptionsPage.updateManagedBannerVisibility(); | 498 OptionsPage.updateManagedBannerVisibility(); |
| 499 | 499 |
| 500 // Recent webkit change no longer allows url change from "chrome://". | 500 // Recent webkit change no longer allows url change from "chrome://". |
| 501 window.history.pushState({pageName: this.name}, this.title, | 501 window.history.pushState({pageName: this.name}, this.title); |
| 502 '/' + this.name); | |
| 503 } | 502 } |
| 504 if (this.tab) { | 503 if (this.tab) { |
| 505 this.tab.classList.add('navbar-item-selected'); | 504 this.tab.classList.add('navbar-item-selected'); |
| 506 } | 505 } |
| 507 } else { | 506 } else { |
| 508 this.pageDiv.classList.add('hidden'); | 507 this.pageDiv.classList.add('hidden'); |
| 509 if (this.isOverlay) { | 508 if (this.isOverlay) { |
| 510 $('overlay').classList.add('hidden'); | 509 $('overlay').classList.add('hidden'); |
| 511 } else if (this.parentPage) { | 510 } else if (this.parentPage) { |
| 512 var nestingLevel = this.nestingLevel; | 511 var nestingLevel = this.nestingLevel; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 OptionsPage.showOverlay(hash); | 574 OptionsPage.showOverlay(hash); |
| 576 }, | 575 }, |
| 577 }; | 576 }; |
| 578 | 577 |
| 579 // Export | 578 // Export |
| 580 return { | 579 return { |
| 581 OptionsPage: OptionsPage | 580 OptionsPage: OptionsPage |
| 582 }; | 581 }; |
| 583 | 582 |
| 584 }); | 583 }); |
| OLD | NEW |