OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 var AddLanguageOverlay = options.AddLanguageOverlay; | 5 var AddLanguageOverlay = options.AddLanguageOverlay; |
6 var AlertOverlay = options.AlertOverlay; | 6 var AlertOverlay = options.AlertOverlay; |
7 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; | 7 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; |
8 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; | 8 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; |
9 var AutofillOptions = options.AutofillOptions; | 9 var AutofillOptions = options.AutofillOptions; |
10 var BrowserOptions = options.BrowserOptions; | 10 var BrowserOptions = options.BrowserOptions; |
(...skipping 14 matching lines...) Expand all Loading... |
25 var OptionsPage = options.OptionsPage; | 25 var OptionsPage = options.OptionsPage; |
26 var PasswordManager = options.PasswordManager; | 26 var PasswordManager = options.PasswordManager; |
27 var Preferences = options.Preferences; | 27 var Preferences = options.Preferences; |
28 var PreferredNetworks = options.PreferredNetworks; | 28 var PreferredNetworks = options.PreferredNetworks; |
29 var ManageProfileOverlay = options.ManageProfileOverlay; | 29 var ManageProfileOverlay = options.ManageProfileOverlay; |
30 var SearchEngineManager = options.SearchEngineManager; | 30 var SearchEngineManager = options.SearchEngineManager; |
31 var SearchPage = options.SearchPage; | 31 var SearchPage = options.SearchPage; |
32 var SpellingConfirmOverlay = options.SpellingConfirmOverlay; | 32 var SpellingConfirmOverlay = options.SpellingConfirmOverlay; |
33 var StartupOverlay = options.StartupOverlay; | 33 var StartupOverlay = options.StartupOverlay; |
34 var SyncSetupOverlay = options.SyncSetupOverlay; | 34 var SyncSetupOverlay = options.SyncSetupOverlay; |
| 35 var WebIntentsDefaults = options.WebIntentsDefaults; |
35 | 36 |
36 /** | 37 /** |
37 * DOMContentLoaded handler, sets up the page. | 38 * DOMContentLoaded handler, sets up the page. |
38 */ | 39 */ |
39 function load() { | 40 function load() { |
40 // Decorate the existing elements in the document. | 41 // Decorate the existing elements in the document. |
41 cr.ui.decorate('input[pref][type=checkbox]', options.PrefCheckbox); | 42 cr.ui.decorate('input[pref][type=checkbox]', options.PrefCheckbox); |
42 cr.ui.decorate('input[pref][type=number]', options.PrefNumber); | 43 cr.ui.decorate('input[pref][type=number]', options.PrefNumber); |
43 cr.ui.decorate('input[pref][type=radio]', options.PrefRadio); | 44 cr.ui.decorate('input[pref][type=radio]', options.PrefRadio); |
44 cr.ui.decorate('input[pref][type=range]', options.PrefRange); | 45 cr.ui.decorate('input[pref][type=range]', options.PrefRange); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 [$('privacyContentSettingsButton'), | 86 [$('privacyContentSettingsButton'), |
86 $('show-app-cookies-button')]); | 87 $('show-app-cookies-button')]); |
87 OptionsPage.registerOverlay(FontSettings.getInstance(), | 88 OptionsPage.registerOverlay(FontSettings.getInstance(), |
88 BrowserOptions.getInstance(), | 89 BrowserOptions.getInstance(), |
89 [$('fontSettingsCustomizeFontsButton')]); | 90 [$('fontSettingsCustomizeFontsButton')]); |
90 if (HandlerOptions && $('manage-handlers-button')) { | 91 if (HandlerOptions && $('manage-handlers-button')) { |
91 OptionsPage.registerOverlay(HandlerOptions.getInstance(), | 92 OptionsPage.registerOverlay(HandlerOptions.getInstance(), |
92 ContentSettings.getInstance(), | 93 ContentSettings.getInstance(), |
93 [$('manage-handlers-button')]); | 94 [$('manage-handlers-button')]); |
94 } | 95 } |
| 96 OptionsPage.registerOverlay(WebIntentsDefaults.getInstance(), |
| 97 ContentSettings.getInstance(), |
| 98 [$('manage-web-intents-defaults-button')]); |
95 OptionsPage.registerOverlay(HomePageOverlay.getInstance(), | 99 OptionsPage.registerOverlay(HomePageOverlay.getInstance(), |
96 BrowserOptions.getInstance(), | 100 BrowserOptions.getInstance(), |
97 [$('change-home-page')]); | 101 [$('change-home-page')]); |
98 OptionsPage.registerOverlay(ImportDataOverlay.getInstance(), | 102 OptionsPage.registerOverlay(ImportDataOverlay.getInstance(), |
99 BrowserOptions.getInstance()); | 103 BrowserOptions.getInstance()); |
100 OptionsPage.registerOverlay(InstantConfirmOverlay.getInstance(), | 104 OptionsPage.registerOverlay(InstantConfirmOverlay.getInstance(), |
101 BrowserOptions.getInstance()); | 105 BrowserOptions.getInstance()); |
102 OptionsPage.registerOverlay(LanguageOptions.getInstance(), | 106 OptionsPage.registerOverlay(LanguageOptions.getInstance(), |
103 BrowserOptions.getInstance(), | 107 BrowserOptions.getInstance(), |
104 [$('language-button')]); | 108 [$('language-button')]); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 options.OptionsPage.willClose(); | 231 options.OptionsPage.willClose(); |
228 }; | 232 }; |
229 | 233 |
230 /** | 234 /** |
231 * Listener for the |popstate| event. | 235 * Listener for the |popstate| event. |
232 * @param {Event} e The |popstate| event. | 236 * @param {Event} e The |popstate| event. |
233 */ | 237 */ |
234 window.onpopstate = function(e) { | 238 window.onpopstate = function(e) { |
235 options.OptionsPage.setState(e.state); | 239 options.OptionsPage.setState(e.state); |
236 }; | 240 }; |
OLD | NEW |