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 | |
13 | 12 |
14 namespace base { | 13 namespace base { |
15 class DictionaryValue; | 14 class DictionaryValue; |
16 } | 15 } |
17 | 16 |
18 namespace chromeos { | 17 namespace chromeos { |
19 class NetworkTypePattern; | 18 class NetworkTypePattern; |
20 } | 19 } |
21 | 20 |
22 namespace ash { | 21 namespace ash { |
23 namespace network_connect { | 22 namespace network_connect { |
24 | 23 |
25 ASH_EXPORT extern const char kNetworkConnectNotificationId[]; | 24 ASH_EXPORT extern const char kNetworkConnectNotificationId[]; |
26 ASH_EXPORT extern const char kNetworkActivateNotificationId[]; | 25 ASH_EXPORT extern const char kNetworkActivateNotificationId[]; |
27 | 26 |
28 ASH_EXPORT extern const char kErrorActivateFailed[]; | 27 ASH_EXPORT extern const char kErrorActivateFailed[]; |
29 | 28 |
30 // Requests a network connection and handles any errors and notifications. | 29 // Requests a network connection and handles any errors and notifications. |
31 // |parent_window| is used to parent any UI on failure (e.g. for certificate | 30 ASH_EXPORT void ConnectToNetwork(const std::string& service_path); |
32 // enrollment). If NULL, the default window will be used. | |
33 ASH_EXPORT void ConnectToNetwork(const std::string& service_path, | |
34 gfx::NativeWindow parent_window); | |
35 | 31 |
36 // Enables or disables a network technology. If |technology| refers to cellular | 32 // Enables or disables a network technology. If |technology| refers to cellular |
37 // and the device cannot be enabled due to a SIM lock, this function will | 33 // and the device cannot be enabled due to a SIM lock, this function will |
38 // launch the SIM unlock dialog. | 34 // launch the SIM unlock dialog. |
39 ASH_EXPORT void SetTechnologyEnabled( | 35 ASH_EXPORT void SetTechnologyEnabled( |
40 const chromeos::NetworkTypePattern& technology, | 36 const chromeos::NetworkTypePattern& technology, |
41 bool enabled_state); | 37 bool enabled_state); |
42 | 38 |
43 // Requests network activation and handles any errors and notifications. | 39 // Requests network activation and handles any errors and notifications. |
44 ASH_EXPORT void ActivateCellular(const std::string& service_path); | 40 ASH_EXPORT void ActivateCellular(const std::string& service_path); |
(...skipping 25 matching lines...) Expand all Loading... |
70 const std::string& service_path); | 66 const std::string& service_path); |
71 | 67 |
72 // Shows the settings for the network specified by |service_path|. If empty, | 68 // Shows the settings for the network specified by |service_path|. If empty, |
73 // or no matching network exists, shows the general internet settings page. | 69 // or no matching network exists, shows the general internet settings page. |
74 ASH_EXPORT void ShowNetworkSettings(const std::string& service_path); | 70 ASH_EXPORT void ShowNetworkSettings(const std::string& service_path); |
75 | 71 |
76 } // network_connect | 72 } // network_connect |
77 } // ash | 73 } // ash |
78 | 74 |
79 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 75 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
OLD | NEW |