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/chromeos/internet_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | 37 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
38 #include "chrome/browser/chromeos/settings/cros_settings.h" | 38 #include "chrome/browser/chromeos/settings/cros_settings.h" |
39 #include "chrome/browser/chromeos/sim_dialog_delegate.h" | 39 #include "chrome/browser/chromeos/sim_dialog_delegate.h" |
40 #include "chrome/browser/chromeos/status/network_menu_icon.h" | 40 #include "chrome/browser/chromeos/status/network_menu_icon.h" |
41 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 41 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
42 #include "chrome/browser/profiles/profile.h" | 42 #include "chrome/browser/profiles/profile.h" |
43 #include "chrome/browser/profiles/profile_manager.h" | 43 #include "chrome/browser/profiles/profile_manager.h" |
44 #include "chrome/browser/ui/browser.h" | 44 #include "chrome/browser/ui/browser.h" |
45 #include "chrome/browser/ui/browser_finder.h" | 45 #include "chrome/browser/ui/browser_finder.h" |
46 #include "chrome/browser/ui/browser_window.h" | 46 #include "chrome/browser/ui/browser_window.h" |
| 47 #include "chrome/browser/ui/host_desktop.h" |
47 #include "chrome/browser/ui/singleton_tabs.h" | 48 #include "chrome/browser/ui/singleton_tabs.h" |
48 #include "chrome/browser/ui/webui/web_ui_util.h" | 49 #include "chrome/browser/ui/webui/web_ui_util.h" |
49 #include "chrome/common/chrome_notification_types.h" | 50 #include "chrome/common/chrome_notification_types.h" |
50 #include "chrome/common/chrome_switches.h" | 51 #include "chrome/common/chrome_switches.h" |
51 #include "chrome/common/time_format.h" | 52 #include "chrome/common/time_format.h" |
52 #include "content/public/browser/notification_service.h" | 53 #include "content/public/browser/notification_service.h" |
53 #include "content/public/browser/web_contents.h" | 54 #include "content/public/browser/web_contents.h" |
54 #include "content/public/browser/web_ui.h" | 55 #include "content/public/browser/web_ui.h" |
55 #include "grit/chromium_strings.h" | 56 #include "grit/chromium_strings.h" |
56 #include "grit/generated_resources.h" | 57 #include "grit/generated_resources.h" |
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1528 gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const { | 1529 gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const { |
1529 // TODO(beng): This is an improper direct dependency on Browser. Route this | 1530 // TODO(beng): This is an improper direct dependency on Browser. Route this |
1530 // through some sort of delegate. | 1531 // through some sort of delegate. |
1531 Browser* browser = | 1532 Browser* browser = |
1532 browser::FindBrowserWithWebContents(web_ui()->GetWebContents()); | 1533 browser::FindBrowserWithWebContents(web_ui()->GetWebContents()); |
1533 return browser->window()->GetNativeWindow(); | 1534 return browser->window()->GetNativeWindow(); |
1534 } | 1535 } |
1535 | 1536 |
1536 Browser* InternetOptionsHandler::GetAppropriateBrowser() { | 1537 Browser* InternetOptionsHandler::GetAppropriateBrowser() { |
1537 return browser::FindOrCreateTabbedBrowser( | 1538 return browser::FindOrCreateTabbedBrowser( |
1538 ProfileManager::GetDefaultProfileOrOffTheRecord()); | 1539 ProfileManager::GetDefaultProfileOrOffTheRecord(), |
| 1540 chrome::HOST_DESKTOP_TYPE_ASH); |
1539 } | 1541 } |
1540 | 1542 |
1541 void InternetOptionsHandler::NetworkCommandCallback(const ListValue* args) { | 1543 void InternetOptionsHandler::NetworkCommandCallback(const ListValue* args) { |
1542 std::string str_type; | 1544 std::string str_type; |
1543 std::string service_path; | 1545 std::string service_path; |
1544 std::string command; | 1546 std::string command; |
1545 if (args->GetSize() != 3 || | 1547 if (args->GetSize() != 3 || |
1546 !args->GetString(0, &str_type) || | 1548 !args->GetString(0, &str_type) || |
1547 !args->GetString(1, &service_path) || | 1549 !args->GetString(1, &service_path) || |
1548 !args->GetString(2, &command)) { | 1550 !args->GetString(2, &command)) { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1799 | 1801 |
1800 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled()); | 1802 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled()); |
1801 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available()); | 1803 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available()); |
1802 dictionary->SetBoolean(kTagWimaxBusy, cros_->wimax_busy()); | 1804 dictionary->SetBoolean(kTagWimaxBusy, cros_->wimax_busy()); |
1803 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once | 1805 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once |
1804 // we have proper back-end support. | 1806 // we have proper back-end support. |
1805 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode()); | 1807 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode()); |
1806 } | 1808 } |
1807 | 1809 |
1808 } // namespace options | 1810 } // namespace options |
OLD | NEW |