| 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 #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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); | 792 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); |
| 793 | 793 |
| 794 cros->ConnectToWifiNetwork(ssid, sec, password); | 794 cros->ConnectToWifiNetwork(ssid, sec, password); |
| 795 } | 795 } |
| 796 | 796 |
| 797 void InternetOptionsHandler::CreateModalPopup(views::WindowDelegate* view) { | 797 void InternetOptionsHandler::CreateModalPopup(views::WindowDelegate* view) { |
| 798 DCHECK(!use_settings_ui_); | 798 DCHECK(!use_settings_ui_); |
| 799 views::Window* window = browser::CreateViewsWindow(GetNativeWindow(), | 799 views::Window* window = browser::CreateViewsWindow(GetNativeWindow(), |
| 800 gfx::Rect(), | 800 gfx::Rect(), |
| 801 view); | 801 view); |
| 802 window->SetAlwaysOnTop(true); | 802 window->SetIsAlwaysOnTop(true); |
| 803 window->Show(); | 803 window->Show(); |
| 804 } | 804 } |
| 805 | 805 |
| 806 gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const { | 806 gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const { |
| 807 // TODO(beng): This is an improper direct dependency on Browser. Route this | 807 // TODO(beng): This is an improper direct dependency on Browser. Route this |
| 808 // through some sort of delegate. | 808 // through some sort of delegate. |
| 809 Browser* browser = BrowserList::FindBrowserWithProfile(web_ui_->GetProfile()); | 809 Browser* browser = BrowserList::FindBrowserWithProfile(web_ui_->GetProfile()); |
| 810 return browser->window()->GetNativeHandle(); | 810 return browser->window()->GetNativeHandle(); |
| 811 } | 811 } |
| 812 | 812 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 DictionaryValue* dictionary, chromeos::NetworkLibrary* cros) { | 1194 DictionaryValue* dictionary, chromeos::NetworkLibrary* cros) { |
| 1195 dictionary->SetBoolean("accessLocked", cros->IsLocked()); | 1195 dictionary->SetBoolean("accessLocked", cros->IsLocked()); |
| 1196 dictionary->Set("wiredList", GetWiredList()); | 1196 dictionary->Set("wiredList", GetWiredList()); |
| 1197 dictionary->Set("wirelessList", GetWirelessList()); | 1197 dictionary->Set("wirelessList", GetWirelessList()); |
| 1198 dictionary->Set("rememberedList", GetRememberedList()); | 1198 dictionary->Set("rememberedList", GetRememberedList()); |
| 1199 dictionary->SetBoolean("wifiAvailable", cros->wifi_available()); | 1199 dictionary->SetBoolean("wifiAvailable", cros->wifi_available()); |
| 1200 dictionary->SetBoolean("wifiEnabled", cros->wifi_enabled()); | 1200 dictionary->SetBoolean("wifiEnabled", cros->wifi_enabled()); |
| 1201 dictionary->SetBoolean("cellularAvailable", cros->cellular_available()); | 1201 dictionary->SetBoolean("cellularAvailable", cros->cellular_available()); |
| 1202 dictionary->SetBoolean("cellularEnabled", cros->cellular_enabled()); | 1202 dictionary->SetBoolean("cellularEnabled", cros->cellular_enabled()); |
| 1203 } | 1203 } |
| OLD | NEW |