| 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 19 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/chromeos/options/network_config_view.h" | 30 #include "chrome/browser/chromeos/options/network_config_view.h" |
| 31 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | 31 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 32 #include "chrome/browser/chromeos/sim_dialog_delegate.h" | 32 #include "chrome/browser/chromeos/sim_dialog_delegate.h" |
| 33 #include "chrome/browser/chromeos/status/network_menu_icon.h" | 33 #include "chrome/browser/chromeos/status/network_menu_icon.h" |
| 34 #include "chrome/browser/chromeos/user_cros_settings_provider.h" | 34 #include "chrome/browser/chromeos/user_cros_settings_provider.h" |
| 35 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 35 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
| 36 #include "chrome/browser/profiles/profile.h" | 36 #include "chrome/browser/profiles/profile.h" |
| 37 #include "chrome/browser/ui/browser.h" | 37 #include "chrome/browser/ui/browser.h" |
| 38 #include "chrome/browser/ui/browser_list.h" | 38 #include "chrome/browser/ui/browser_list.h" |
| 39 #include "chrome/browser/ui/browser_window.h" | 39 #include "chrome/browser/ui/browser_window.h" |
| 40 #include "chrome/browser/ui/dialog_style.h" |
| 40 #include "chrome/browser/ui/views/window.h" | 41 #include "chrome/browser/ui/views/window.h" |
| 41 #include "chrome/browser/ui/webui/web_ui_util.h" | 42 #include "chrome/browser/ui/webui/web_ui_util.h" |
| 42 #include "chrome/common/chrome_notification_types.h" | 43 #include "chrome/common/chrome_notification_types.h" |
| 43 #include "chrome/common/chrome_switches.h" | 44 #include "chrome/common/chrome_switches.h" |
| 44 #include "chrome/common/time_format.h" | 45 #include "chrome/common/time_format.h" |
| 45 #include "content/public/browser/notification_service.h" | 46 #include "content/public/browser/notification_service.h" |
| 46 #include "grit/chromium_strings.h" | 47 #include "grit/chromium_strings.h" |
| 47 #include "grit/generated_resources.h" | 48 #include "grit/generated_resources.h" |
| 48 #include "grit/locale_settings.h" | 49 #include "grit/locale_settings.h" |
| 49 #include "grit/theme_resources.h" | 50 #include "grit/theme_resources.h" |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 dictionary->SetBoolean("showBuyButton", true); | 891 dictionary->SetBoolean("showBuyButton", true); |
| 891 } else if (cellular->activation_state() != | 892 } else if (cellular->activation_state() != |
| 892 chromeos::ACTIVATION_STATE_ACTIVATING && | 893 chromeos::ACTIVATION_STATE_ACTIVATING && |
| 893 cellular->activation_state() != | 894 cellular->activation_state() != |
| 894 chromeos::ACTIVATION_STATE_ACTIVATED) { | 895 chromeos::ACTIVATION_STATE_ACTIVATED) { |
| 895 dictionary->SetBoolean("showActivateButton", true); | 896 dictionary->SetBoolean("showActivateButton", true); |
| 896 } | 897 } |
| 897 } | 898 } |
| 898 | 899 |
| 899 void InternetOptionsHandler::CreateModalPopup(views::WidgetDelegate* view) { | 900 void InternetOptionsHandler::CreateModalPopup(views::WidgetDelegate* view) { |
| 900 views::Widget* window = browser::CreateViewsWindow(GetNativeWindow(), view); | 901 views::Widget* window = browser::CreateViewsWindow(GetNativeWindow(), |
| 902 view, |
| 903 STYLE_GENERIC); |
| 901 window->SetAlwaysOnTop(true); | 904 window->SetAlwaysOnTop(true); |
| 902 window->Show(); | 905 window->Show(); |
| 903 } | 906 } |
| 904 | 907 |
| 905 gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const { | 908 gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const { |
| 906 // TODO(beng): This is an improper direct dependency on Browser. Route this | 909 // TODO(beng): This is an improper direct dependency on Browser. Route this |
| 907 // through some sort of delegate. | 910 // through some sort of delegate. |
| 908 Browser* browser = | 911 Browser* browser = |
| 909 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui_)); | 912 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui_)); |
| 910 return browser->window()->GetNativeHandle(); | 913 return browser->window()->GetNativeHandle(); |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 dictionary->Set("wirelessList", GetWirelessList()); | 1293 dictionary->Set("wirelessList", GetWirelessList()); |
| 1291 dictionary->Set("vpnList", GetVPNList()); | 1294 dictionary->Set("vpnList", GetVPNList()); |
| 1292 dictionary->Set("rememberedList", GetRememberedList()); | 1295 dictionary->Set("rememberedList", GetRememberedList()); |
| 1293 dictionary->SetBoolean("wifiAvailable", cros_->wifi_available()); | 1296 dictionary->SetBoolean("wifiAvailable", cros_->wifi_available()); |
| 1294 dictionary->SetBoolean("wifiBusy", cros_->wifi_busy()); | 1297 dictionary->SetBoolean("wifiBusy", cros_->wifi_busy()); |
| 1295 dictionary->SetBoolean("wifiEnabled", cros_->wifi_enabled()); | 1298 dictionary->SetBoolean("wifiEnabled", cros_->wifi_enabled()); |
| 1296 dictionary->SetBoolean("cellularAvailable", cros_->cellular_available()); | 1299 dictionary->SetBoolean("cellularAvailable", cros_->cellular_available()); |
| 1297 dictionary->SetBoolean("cellularBusy", cros_->cellular_busy()); | 1300 dictionary->SetBoolean("cellularBusy", cros_->cellular_busy()); |
| 1298 dictionary->SetBoolean("cellularEnabled", cros_->cellular_enabled()); | 1301 dictionary->SetBoolean("cellularEnabled", cros_->cellular_enabled()); |
| 1299 } | 1302 } |
| OLD | NEW |