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 "apps/shell_window.h" | 10 #include "apps/shell_window.h" |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 | 704 |
705 #if defined(ENABLE_MDNS) | 705 #if defined(ENABLE_MDNS) |
706 if (cloud_print_mdns_ui_enabled_) { | 706 if (cloud_print_mdns_ui_enabled_) { |
707 web_ui()->RegisterMessageCallback( | 707 web_ui()->RegisterMessageCallback( |
708 "showCloudPrintDevicesPage", | 708 "showCloudPrintDevicesPage", |
709 base::Bind(&BrowserOptionsHandler::ShowCloudPrintDevicesPage, | 709 base::Bind(&BrowserOptionsHandler::ShowCloudPrintDevicesPage, |
710 base::Unretained(this))); | 710 base::Unretained(this))); |
711 } | 711 } |
712 #endif | 712 #endif |
713 web_ui()->RegisterMessageCallback( | 713 web_ui()->RegisterMessageCallback( |
714 "requestHotwordAvailabile", | 714 "requestHotwordAvailable", |
715 base::Bind(&BrowserOptionsHandler::HandleRequestHotwordAvailable, | 715 base::Bind(&BrowserOptionsHandler::HandleRequestHotwordAvailable, |
716 base::Unretained(this))); | 716 base::Unretained(this))); |
717 } | 717 } |
718 | 718 |
719 void BrowserOptionsHandler::Uninitialize() { | 719 void BrowserOptionsHandler::Uninitialize() { |
720 registrar_.RemoveAll(); | 720 registrar_.RemoveAll(); |
721 } | 721 } |
722 | 722 |
723 void BrowserOptionsHandler::OnStateChanged() { | 723 void BrowserOptionsHandler::OnStateChanged() { |
724 UpdateSyncState(); | 724 UpdateSyncState(); |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1702 void BrowserOptionsHandler::SetupManagingSupervisedUsers() { | 1702 void BrowserOptionsHandler::SetupManagingSupervisedUsers() { |
1703 bool has_users = !Profile::FromWebUI(web_ui())-> | 1703 bool has_users = !Profile::FromWebUI(web_ui())-> |
1704 GetPrefs()->GetDictionary(prefs::kManagedUsers)->empty(); | 1704 GetPrefs()->GetDictionary(prefs::kManagedUsers)->empty(); |
1705 base::FundamentalValue has_users_value(has_users); | 1705 base::FundamentalValue has_users_value(has_users); |
1706 web_ui()->CallJavascriptFunction( | 1706 web_ui()->CallJavascriptFunction( |
1707 "BrowserOptions.updateManagesSupervisedUsers", | 1707 "BrowserOptions.updateManagesSupervisedUsers", |
1708 has_users_value); | 1708 has_users_value); |
1709 } | 1709 } |
1710 | 1710 |
1711 } // namespace options | 1711 } // namespace options |
OLD | NEW |