Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc

Issue 2434683003: Move NetworkStateNotifier and NetworkConnect from src/ui (Closed)
Patch Set: Fix virtuals Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/ash/vpn_delegate_chromeos.cc ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/bind_helpers.h" 14 #include "base/bind_helpers.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/chromeos/enrollment_dialog_view.h" 16 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
17 #include "chrome/browser/chromeos/mobile_config.h" 17 #include "chrome/browser/chromeos/mobile_config.h"
18 #include "chrome/browser/chromeos/options/network_config_view.h" 18 #include "chrome/browser/chromeos/options/network_config_view.h"
19 #include "chrome/browser/chromeos/profiles/profile_helper.h" 19 #include "chrome/browser/chromeos/profiles/profile_helper.h"
20 #include "chrome/browser/chromeos/settings/cros_settings.h" 20 #include "chrome/browser/chromeos/settings/cros_settings.h"
21 #include "chrome/browser/chromeos/sim_dialog_delegate.h" 21 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
22 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" 22 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h"
23 #include "chrome/browser/chromeos/ui/mobile_config_ui.h" 23 #include "chrome/browser/chromeos/ui/mobile_config_ui.h"
24 #include "chrome/browser/chromeos/ui_proxy_config_service.h" 24 #include "chrome/browser/chromeos/ui_proxy_config_service.h"
25 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" 26 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h"
27 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler_stri ngs.h" 27 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler_stri ngs.h"
28 #include "chromeos/login/login_state.h" 28 #include "chromeos/login/login_state.h"
29 #include "chromeos/network/managed_network_configuration_handler.h" 29 #include "chromeos/network/managed_network_configuration_handler.h"
30 #include "chromeos/network/network_connect.h"
30 #include "chromeos/network/network_state.h" 31 #include "chromeos/network/network_state.h"
31 #include "chromeos/network/network_state_handler.h" 32 #include "chromeos/network/network_state_handler.h"
32 #include "components/onc/onc_constants.h" 33 #include "components/onc/onc_constants.h"
33 #include "components/user_manager/user_manager.h" 34 #include "components/user_manager/user_manager.h"
34 #include "content/public/browser/web_contents.h" 35 #include "content/public/browser/web_contents.h"
35 #include "content/public/browser/web_ui.h" 36 #include "content/public/browser/web_ui.h"
36 #include "extensions/browser/api/vpn_provider/vpn_service.h" 37 #include "extensions/browser/api/vpn_provider/vpn_service.h"
37 #include "extensions/browser/api/vpn_provider/vpn_service_factory.h" 38 #include "extensions/browser/api/vpn_provider/vpn_service_factory.h"
38 #include "third_party/cros_system_api/dbus/service_constants.h" 39 #include "third_party/cros_system_api/dbus/service_constants.h"
39 #include "ui/base/webui/web_ui_util.h" 40 #include "ui/base/webui/web_ui_util.h"
40 #include "ui/chromeos/network/network_connect.h"
41 41
42 namespace chromeos { 42 namespace chromeos {
43 namespace options { 43 namespace options {
44 44
45 namespace { 45 namespace {
46 46
47 const char kAllowOnlyPolicyNetworksToConnect[] = 47 const char kAllowOnlyPolicyNetworksToConnect[] =
48 "allowOnlyPolicyNetworksToConnect"; 48 "allowOnlyPolicyNetworksToConnect";
49 49
50 // Keys for the initial "localized" dictionary values. 50 // Keys for the initial "localized" dictionary values.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const base::ListValue* args) { 142 const base::ListValue* args) {
143 if (!web_ui()) 143 if (!web_ui())
144 return; 144 return;
145 std::string guid; 145 std::string guid;
146 if (args->GetSize() != 1 || !args->GetString(0, &guid)) { 146 if (args->GetSize() != 1 || !args->GetString(0, &guid)) {
147 NOTREACHED(); 147 NOTREACHED();
148 return; 148 return;
149 } 149 }
150 std::string service_path = ServicePathFromGuid(guid); 150 std::string service_path = ServicePathFromGuid(guid);
151 if (!service_path.empty()) 151 if (!service_path.empty())
152 ui::NetworkConnect::Get()->ShowMobileSetup(service_path); 152 NetworkConnect::Get()->ShowMobileSetup(service_path);
153 } 153 }
154 154
155 void InternetOptionsHandler::SimOperationCallback(const base::ListValue* args) { 155 void InternetOptionsHandler::SimOperationCallback(const base::ListValue* args) {
156 std::string operation; 156 std::string operation;
157 if (args->GetSize() != 1 || !args->GetString(0, &operation)) { 157 if (args->GetSize() != 1 || !args->GetString(0, &operation)) {
158 NOTREACHED(); 158 NOTREACHED();
159 return; 159 return;
160 } 160 }
161 if (operation == kTagSimOpConfigure) { 161 if (operation == kTagSimOpConfigure) {
162 mobile_config_ui::DisplayConfigDialog(); 162 mobile_config_ui::DisplayConfigDialog();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if (!force_show && !network->connectable() && 261 if (!force_show && !network->connectable() &&
262 enrollment::CreateDialog(service_path, GetNativeWindow())) { 262 enrollment::CreateDialog(service_path, GetNativeWindow())) {
263 return; 263 return;
264 } 264 }
265 265
266 NetworkConfigView::ShowInParent(network->guid(), GetNativeWindow()); 266 NetworkConfigView::ShowInParent(network->guid(), GetNativeWindow());
267 } 267 }
268 268
269 } // namespace options 269 } // namespace options
270 } // namespace chromeos 270 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/vpn_delegate_chromeos.cc ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698