OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow | 10 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow |
11 | 11 |
12 namespace chromeos { | 12 namespace chromeos { |
13 namespace network_connect { | 13 namespace network_connect { |
14 | 14 |
15 enum ConnectResult { | 15 enum ConnectResult { |
16 NETWORK_NOT_FOUND, | 16 NETWORK_NOT_FOUND, |
17 CONNECT_NOT_STARTED, | 17 CONNECT_NOT_STARTED, |
18 CONNECT_STARTED | 18 CONNECT_STARTED |
19 }; | 19 }; |
20 | 20 |
| 21 // Activate the cellular network associated with |service_path| if direct |
| 22 // activation is supported, otherwise call ShowMobileSetup. |
| 23 void ActivateCellular(const std::string& service_path); |
| 24 |
| 25 // Shows the mobile setup dialog which handles: |
| 26 // * Activation for non direct-activation networks |
| 27 // * Showing network plan info |
| 28 void ShowMobileSetup(const std::string& service_path); |
| 29 |
21 // Attempts to connect to the network specified by |service_path|. | 30 // Attempts to connect to the network specified by |service_path|. |
22 // Returns one of the following results: | 31 // Returns one of the following results: |
23 // NETWORK_NOT_FOUND if the network does not exist. | 32 // NETWORK_NOT_FOUND if the network does not exist. |
24 // CONNECT_NOT_STARTED if no connection attempt was started, e.g. because the | 33 // CONNECT_NOT_STARTED if no connection attempt was started, e.g. because the |
25 // network is already connected, connecting, or activating. | 34 // network is already connected, connecting, or activating. |
26 // CONNECT_STARTED if a connection attempt was started. | 35 // CONNECT_STARTED if a connection attempt was started. |
27 ConnectResult ConnectToNetwork(const std::string& service_path, | 36 ConnectResult ConnectToNetwork(const std::string& service_path, |
28 gfx::NativeWindow parent_window); | 37 gfx::NativeWindow parent_window); |
29 | 38 |
30 } // namespace network_connect | 39 } // namespace network_connect |
31 } // namespace chromeos | 40 } // namespace chromeos |
32 | 41 |
33 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_ | 42 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_ |
OLD | NEW |