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 chromeos { |
| 19 class NetworkTypePattern; |
| 20 } |
| 21 |
18 namespace ash { | 22 namespace ash { |
19 namespace network_connect { | 23 namespace network_connect { |
20 | 24 |
21 ASH_EXPORT extern const char kNetworkConnectNotificationId[]; | 25 ASH_EXPORT extern const char kNetworkConnectNotificationId[]; |
22 ASH_EXPORT extern const char kNetworkActivateNotificationId[]; | 26 ASH_EXPORT extern const char kNetworkActivateNotificationId[]; |
23 | 27 |
24 ASH_EXPORT extern const char kErrorActivateFailed[]; | 28 ASH_EXPORT extern const char kErrorActivateFailed[]; |
25 | 29 |
26 // Requests a network connection and handles any errors and notifications. | 30 // Requests a network connection and handles any errors and notifications. |
27 // |owning_window| is used to parent any UI on failure (e.g. for certificate | 31 // |owning_window| is used to parent any UI on failure (e.g. for certificate |
28 // enrollment). If NULL, the default window will be used. | 32 // enrollment). If NULL, the default window will be used. |
29 ASH_EXPORT void ConnectToNetwork(const std::string& service_path, | 33 ASH_EXPORT void ConnectToNetwork(const std::string& service_path, |
30 gfx::NativeWindow owning_window); | 34 gfx::NativeWindow owning_window); |
31 | 35 |
32 // Enables or disables a network technology. If |technology| refers to cellular | 36 // Enables or disables a network technology. If |technology| refers to cellular |
33 // and the device cannot be enabled due to a SIM lock, this function will | 37 // and the device cannot be enabled due to a SIM lock, this function will |
34 // launch the SIM unlock dialog. | 38 // launch the SIM unlock dialog. |
35 ASH_EXPORT void SetTechnologyEnabled(const std::string& technology, | 39 ASH_EXPORT void SetTechnologyEnabled( |
36 bool enabled_state); | 40 const chromeos::NetworkTypePattern& technology, |
| 41 bool enabled_state); |
37 | 42 |
38 // Requests network activation and handles any errors and notifications. | 43 // Requests network activation and handles any errors and notifications. |
39 ASH_EXPORT void ActivateCellular(const std::string& service_path); | 44 ASH_EXPORT void ActivateCellular(const std::string& service_path); |
40 | 45 |
41 // Determines whether or not a network requires a connection to activate or | 46 // Determines whether or not a network requires a connection to activate or |
42 // setup and either shows a notification or opens the mobile setup dialog. | 47 // setup and either shows a notification or opens the mobile setup dialog. |
43 ASH_EXPORT void ShowMobileSetup(const std::string& service_path); | 48 ASH_EXPORT void ShowMobileSetup(const std::string& service_path); |
44 | 49 |
45 // Configures a network with a dictionary of Shill properties, then sends a | 50 // Configures a network with a dictionary of Shill properties, then sends a |
46 // connect request. The profile is set according to 'shared' if allowed. | 51 // connect request. The profile is set according to 'shared' if allowed. |
(...skipping 11 matching lines...) Expand all Loading... |
58 ASH_EXPORT base::string16 ErrorString(const std::string& error); | 63 ASH_EXPORT base::string16 ErrorString(const std::string& error); |
59 | 64 |
60 // Shows the settings for the network specified by |service_path|. If empty, | 65 // Shows the settings for the network specified by |service_path|. If empty, |
61 // or no matching network exists, shows the general internet settings page. | 66 // or no matching network exists, shows the general internet settings page. |
62 ASH_EXPORT void ShowNetworkSettings(const std::string& service_path); | 67 ASH_EXPORT void ShowNetworkSettings(const std::string& service_path); |
63 | 68 |
64 } // network_connect | 69 } // network_connect |
65 } // ash | 70 } // ash |
66 | 71 |
67 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 72 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
OLD | NEW |