| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 OptionsPage.keyDownEventHandler_ = function(event) { | 707 OptionsPage.keyDownEventHandler_ = function(event) { |
| 708 // Close the top overlay or sub-page on esc. | 708 // Close the top overlay or sub-page on esc. |
| 709 if (event.keyCode == 27) { // Esc | 709 if (event.keyCode == 27) { // Esc |
| 710 if (this.isOverlayVisible_()) | 710 if (this.isOverlayVisible_()) |
| 711 this.closeOverlay(); | 711 this.closeOverlay(); |
| 712 else | 712 else |
| 713 this.closeTopSubPage_(); | 713 this.closeTopSubPage_(); |
| 714 } | 714 } |
| 715 }; | 715 }; |
| 716 | 716 |
| 717 OptionsPage.setClearPluginLSODataEnabled = function(enabled) { |
| 718 if (enabled) { |
| 719 document.documentElement.setAttribute( |
| 720 'flashPluginSupportsClearSiteData', ''); |
| 721 } else { |
| 722 document.documentElement.removeAttribute( |
| 723 'flashPluginSupportsClearSiteData'); |
| 724 } |
| 725 }; |
| 726 |
| 717 /** | 727 /** |
| 718 * Re-initializes the C++ handlers if necessary. This is called if the | 728 * Re-initializes the C++ handlers if necessary. This is called if the |
| 719 * handlers are torn down and recreated but the DOM may not have been (in | 729 * handlers are torn down and recreated but the DOM may not have been (in |
| 720 * which case |initialize| won't be called again). If |initialize| hasn't been | 730 * which case |initialize| won't be called again). If |initialize| hasn't been |
| 721 * called, this does nothing (since it will be later, once the DOM has | 731 * called, this does nothing (since it will be later, once the DOM has |
| 722 * finished loading). | 732 * finished loading). |
| 723 */ | 733 */ |
| 724 OptionsPage.reinitializeCore = function() { | 734 OptionsPage.reinitializeCore = function() { |
| 725 if (this.initialized_) | 735 if (this.initialized_) |
| 726 chrome.send('coreOptionsInitialize'); | 736 chrome.send('coreOptionsInitialize'); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 canShowPage: function() { | 963 canShowPage: function() { |
| 954 return true; | 964 return true; |
| 955 }, | 965 }, |
| 956 }; | 966 }; |
| 957 | 967 |
| 958 // Export | 968 // Export |
| 959 return { | 969 return { |
| 960 OptionsPage: OptionsPage | 970 OptionsPage: OptionsPage |
| 961 }; | 971 }; |
| 962 }); | 972 }); |
| OLD | NEW |