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 #include "chrome/browser/ui/webui/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
651 base::Unretained(this))); | 651 base::Unretained(this))); |
652 #else | 652 #else |
653 web_ui()->RegisterMessageCallback( | 653 web_ui()->RegisterMessageCallback( |
654 "restartBrowser", | 654 "restartBrowser", |
655 base::Bind(&BrowserOptionsHandler::HandleRestartBrowser, | 655 base::Bind(&BrowserOptionsHandler::HandleRestartBrowser, |
656 base::Unretained(this))); | 656 base::Unretained(this))); |
657 #endif | 657 #endif |
658 } | 658 } |
659 | 659 |
660 void BrowserOptionsHandler::OnStateChanged() { | 660 void BrowserOptionsHandler::OnStateChanged() { |
661 UpdateSyncState(); | |
662 } | |
663 | |
664 void BrowserOptionsHandler::UpdateSyncState() { | |
Adrian Kuegel
2013/08/06 10:05:35
Can you move this function (and OnSigninAllowedPre
Bernhard Bauer
2013/08/06 10:38:49
Done.
| |
661 web_ui()->CallJavascriptFunction("BrowserOptions.updateSyncState", | 665 web_ui()->CallJavascriptFunction("BrowserOptions.updateSyncState", |
662 *GetSyncStateDictionary()); | 666 *GetSyncStateDictionary()); |
663 | |
664 SendProfilesInfo(); | |
Adrian Kuegel
2013/08/06 10:05:35
I haven't completely understood if removing this l
Bernhard Bauer
2013/08/06 10:38:49
Yes, I traced this back to when it was added origi
| |
665 } | 667 } |
666 | 668 |
667 void BrowserOptionsHandler::OnSigninAllowedPrefChange() { | 669 void BrowserOptionsHandler::OnSigninAllowedPrefChange() { |
668 web_ui()->CallJavascriptFunction("BrowserOptions.updateSyncState", | 670 UpdateSyncState(); |
669 *GetSyncStateDictionary()); | |
670 | |
671 SendProfilesInfo(); | |
672 } | 671 } |
673 | 672 |
674 void BrowserOptionsHandler::PageLoadStarted() { | 673 void BrowserOptionsHandler::PageLoadStarted() { |
675 page_initialized_ = false; | 674 page_initialized_ = false; |
676 } | 675 } |
677 | 676 |
678 void BrowserOptionsHandler::InitializeHandler() { | 677 void BrowserOptionsHandler::InitializeHandler() { |
679 Profile* profile = Profile::FromWebUI(web_ui()); | 678 Profile* profile = Profile::FromWebUI(web_ui()); |
680 PrefService* prefs = profile->GetPrefs(); | 679 PrefService* prefs = profile->GetPrefs(); |
681 | 680 |
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1727 base::FundamentalValue disabled(proxy_config && | 1726 base::FundamentalValue disabled(proxy_config && |
1728 !proxy_config->IsUserModifiable()); | 1727 !proxy_config->IsUserModifiable()); |
1729 base::FundamentalValue extension_controlled(is_extension_controlled); | 1728 base::FundamentalValue extension_controlled(is_extension_controlled); |
1730 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", | 1729 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", |
1731 disabled, extension_controlled); | 1730 disabled, extension_controlled); |
1732 | 1731 |
1733 #endif // !defined(OS_CHROMEOS) | 1732 #endif // !defined(OS_CHROMEOS) |
1734 } | 1733 } |
1735 | 1734 |
1736 } // namespace options | 1735 } // namespace options |
OLD | NEW |