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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 /** @const */ var FocusOutlineManager = cr.ui.FocusOutlineManager; | 6 /** @const */ var FocusOutlineManager = cr.ui.FocusOutlineManager; |
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
8 | 8 |
9 var OptionsPage = { | 9 var OptionsPage = { |
10 /** | 10 /** |
11 * This is the absolute difference maintained between standard and | 11 * This is the absolute difference maintained between standard and |
12 * fixed-width font sizes. Refer http://crbug.com/91922. | 12 * fixed-width font sizes. Refer http://crbug.com/91922. |
13 * @const | 13 * @const |
14 */ | 14 */ |
15 SIZE_DIFFERENCE_FIXED_STANDARD: 3, | 15 SIZE_DIFFERENCE_FIXED_STANDARD: 3, |
16 | 16 |
17 /** | 17 /** |
18 * Initializes the complete options page. This will cause all C++ handlers | 18 * Initializes the complete options page. This will cause all C++ handlers |
19 * to be invoked to do final setup. | 19 * to be invoked to do final setup. |
20 */ | 20 */ |
21 initialize: function() { | 21 initialize: function() { |
22 chrome.send('coreOptionsInitialize'); | 22 chrome.send('coreOptionsInitialize'); |
23 uber.onContentFrameLoaded(); | |
24 PageManager.initialize(BrowserOptions.getInstance()); | 23 PageManager.initialize(BrowserOptions.getInstance()); |
25 }, | 24 }, |
26 | 25 |
27 /** | 26 /** |
28 * Shows the tab contents for the given navigation tab. | 27 * Shows the tab contents for the given navigation tab. |
29 * @param {!Element} tab The tab that the user clicked. | 28 * @param {!Element} tab The tab that the user clicked. |
30 */ | 29 */ |
31 showTab: function(tab) { | 30 showTab: function(tab) { |
32 // Search parents until we find a tab, or the nav bar itself. This allows | 31 // Search parents until we find a tab, or the nav bar itself. This allows |
33 // tabs to have child nodes, e.g. labels in separately-styled spans. | 32 // tabs to have child nodes, e.g. labels in separately-styled spans. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 isSettingsApp: function() { | 103 isSettingsApp: function() { |
105 return document.documentElement.classList.contains('settings-app'); | 104 return document.documentElement.classList.contains('settings-app'); |
106 }, | 105 }, |
107 }; | 106 }; |
108 | 107 |
109 // Export | 108 // Export |
110 return { | 109 return { |
111 OptionsPage: OptionsPage | 110 OptionsPage: OptionsPage |
112 }; | 111 }; |
113 }); | 112 }); |
OLD | NEW |