| 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 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
| 8 | 8 |
| 9 // State variables. | 9 // State variables. |
| 10 var syncEnabled = false; | 10 var syncEnabled = false; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // Inherit PersonalOptions from OptionsPage. | 26 // Inherit PersonalOptions from OptionsPage. |
| 27 __proto__: options.OptionsPage.prototype, | 27 __proto__: options.OptionsPage.prototype, |
| 28 | 28 |
| 29 // Initialize PersonalOptions page. | 29 // Initialize PersonalOptions page. |
| 30 initializePage: function() { | 30 initializePage: function() { |
| 31 // Call base class implementation to start preference initialization. | 31 // Call base class implementation to start preference initialization. |
| 32 OptionsPage.prototype.initializePage.call(this); | 32 OptionsPage.prototype.initializePage.call(this); |
| 33 | 33 |
| 34 var self = this; | 34 var self = this; |
| 35 $('sync-action-link').onclick = function(event) { | 35 $('sync-action-link').onclick = function(event) { |
| 36 chrome.send('showSyncActionDialog'); | 36 SyncSetupOverlay.showErrorUI(); |
| 37 }; | 37 }; |
| 38 $('start-stop-sync').onclick = function(event) { | 38 $('start-stop-sync').onclick = function(event) { |
| 39 if (self.syncSetupCompleted) | 39 if (self.syncSetupCompleted) |
| 40 self.showStopSyncingOverlay_(); | 40 self.showStopSyncingOverlay_(); |
| 41 else | 41 else |
| 42 chrome.send('showSyncLoginDialog'); | 42 OptionsPage.navigateToPage('syncSetup'); |
| 43 }; | 43 }; |
| 44 $('customize-sync').onclick = function(event) { | 44 $('customize-sync').onclick = function(event) { |
| 45 chrome.send('showCustomizeSyncDialog'); | 45 OptionsPage.navigateToPage('syncSetup'); |
| 46 }; | 46 }; |
| 47 $('manage-passwords').onclick = function(event) { | 47 $('manage-passwords').onclick = function(event) { |
| 48 OptionsPage.navigateToPage('passwords'); | 48 OptionsPage.navigateToPage('passwords'); |
| 49 OptionsPage.showTab($('passwords-nav-tab')); | 49 OptionsPage.showTab($('passwords-nav-tab')); |
| 50 chrome.send('coreOptionsUserMetricsAction', | 50 chrome.send('coreOptionsUserMetricsAction', |
| 51 ['Options_ShowPasswordManager']); | 51 ['Options_ShowPasswordManager']); |
| 52 }; | 52 }; |
| 53 $('autofill-settings').onclick = function(event) { | 53 $('autofill-settings').onclick = function(event) { |
| 54 OptionsPage.navigateToPage('autofill'); | 54 OptionsPage.navigateToPage('autofill'); |
| 55 chrome.send('coreOptionsUserMetricsAction', | 55 chrome.send('coreOptionsUserMetricsAction', |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 PersonalOptions.getInstance()[name + '_'](value); | 245 PersonalOptions.getInstance()[name + '_'](value); |
| 246 }; | 246 }; |
| 247 }); | 247 }); |
| 248 | 248 |
| 249 // Export | 249 // Export |
| 250 return { | 250 return { |
| 251 PersonalOptions: PersonalOptions | 251 PersonalOptions: PersonalOptions |
| 252 }; | 252 }; |
| 253 | 253 |
| 254 }); | 254 }); |
| OLD | NEW |