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()); | |
25 }, | 23 }, |
26 | 24 |
27 /** | 25 /** |
28 * Shows the tab contents for the given navigation tab. | 26 * Shows the tab contents for the given navigation tab. |
29 * @param {!Element} tab The tab that the user clicked. | 27 * @param {!Element} tab The tab that the user clicked. |
30 */ | 28 */ |
31 showTab: function(tab) { | 29 showTab: function(tab) { |
32 // Search parents until we find a tab, or the nav bar itself. This allows | 30 // 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. | 31 // tabs to have child nodes, e.g. labels in separately-styled spans. |
34 while (tab && !tab.classList.contains('subpages-nav-tabs') && | 32 while (tab && !tab.classList.contains('subpages-nav-tabs') && |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 isSettingsApp: function() { | 102 isSettingsApp: function() { |
105 return document.documentElement.classList.contains('settings-app'); | 103 return document.documentElement.classList.contains('settings-app'); |
106 }, | 104 }, |
107 }; | 105 }; |
108 | 106 |
109 // Export | 107 // Export |
110 return { | 108 return { |
111 OptionsPage: OptionsPage | 109 OptionsPage: OptionsPage |
112 }; | 110 }; |
113 }); | 111 }); |
OLD | NEW |