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 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow | 12 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class DictionaryValue; | 15 class DictionaryValue; |
16 } | 16 } |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 namespace network_connect { | 19 namespace network_connect { |
20 | 20 |
21 // Requests a network connection and handles any errors and notifications. | 21 // Requests a network connection and handles any errors and notifications. |
22 // |owning_window| is used to parent any UI on failure (e.g. for certificate | 22 // |owning_window| is used to parent any UI on failure (e.g. for certificate |
23 // enrollment). If NULL, the default window will be used. | 23 // enrollment). If NULL, the default window will be used. |
24 ASH_EXPORT void ConnectToNetwork(const std::string& service_path, | 24 ASH_EXPORT void ConnectToNetwork(const std::string& service_path, |
25 gfx::NativeWindow owning_window); | 25 gfx::NativeWindow owning_window); |
26 | 26 |
27 // Requests network activation and handles any errors and notifications. | 27 // Requests network activation and handles any errors and notifications. |
28 ASH_EXPORT void ActivateCellular(const std::string& service_path); | 28 ASH_EXPORT void ActivateCellular(const std::string& service_path); |
29 | 29 |
| 30 // Determines whether or not a network requires a connection to activate or |
| 31 // setup and either shows a notification or opens the mobile setup dialog. |
| 32 ASH_EXPORT void ShowMobileSetup(const std::string& service_path); |
| 33 |
30 // Configures a network with a dictionary of Shill properties, then sends a | 34 // Configures a network with a dictionary of Shill properties, then sends a |
31 // connect request. The profile is set according to 'shared' if allowed. | 35 // connect request. The profile is set according to 'shared' if allowed. |
32 ASH_EXPORT void ConfigureNetworkAndConnect( | 36 ASH_EXPORT void ConfigureNetworkAndConnect( |
33 const std::string& service_path, | 37 const std::string& service_path, |
34 const base::DictionaryValue& properties, | 38 const base::DictionaryValue& properties, |
35 bool shared); | 39 bool shared); |
36 | 40 |
37 // Requests a new network configuration to be created from a dictionary of | 41 // Requests a new network configuration to be created from a dictionary of |
38 // Shill properties. The profile used is determined by |shared|. | 42 // Shill properties. The profile used is determined by |shared|. |
39 ASH_EXPORT void CreateConfigurationAndConnect(base::DictionaryValue* properties, | 43 ASH_EXPORT void CreateConfigurationAndConnect(base::DictionaryValue* properties, |
40 bool shared); | 44 bool shared); |
41 | 45 |
42 // Returns the localized string for shill error string |error|. | 46 // Returns the localized string for shill error string |error|. |
43 ASH_EXPORT base::string16 ErrorString(const std::string& error); | 47 ASH_EXPORT base::string16 ErrorString(const std::string& error); |
44 | 48 |
| 49 // Shows the settings for the network specified by |service_path|. If empty, |
| 50 // or no matching network exists, shows the general internet settings page. |
| 51 ASH_EXPORT void ShowNetworkSettings(const std::string& service_path); |
| 52 |
45 } // network_connect | 53 } // network_connect |
46 } // ash | 54 } // ash |
47 | 55 |
48 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 56 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
OLD | NEW |