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 #include <vector> | |
9 | 10 |
11 #include "chromeos/network/onc/onc_constants.h" | |
10 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow | 12 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow |
11 | 13 |
14 namespace base { | |
15 class DictionaryValue; | |
pneubeck (no reviews)
2013/08/06 15:45:19
unused.
stevenjb
2013/08/06 20:23:55
Used by FindPolicyForActiveUser
| |
16 } | |
17 | |
12 namespace chromeos { | 18 namespace chromeos { |
19 | |
20 class NetworkState; | |
21 | |
13 namespace network_connect { | 22 namespace network_connect { |
14 | 23 |
15 enum ConnectResult { | |
16 NETWORK_NOT_FOUND, | |
17 CONNECT_NOT_STARTED, | |
18 CONNECT_STARTED | |
19 }; | |
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: | 24 // Shows the mobile setup dialog which handles: |
26 // * Activation for non direct-activation networks | 25 // * Activation for non direct-activation networks |
27 // * Showing network plan info | 26 // * Showing network plan info |
28 void ShowMobileSetup(const std::string& service_path); | 27 void ShowMobileSetup(const std::string& service_path); |
29 | 28 |
30 // Attempts to connect to the network specified by |service_path|. | 29 // Shows the network settings subpage for |service_path| (or the main |
31 // Returns one of the following results: | 30 // network settings page if empty). |
32 // NETWORK_NOT_FOUND if the network does not exist. | 31 void ShowNetworkSettings(const std::string& service_path); |
33 // CONNECT_NOT_STARTED if no connection attempt was started, e.g. because the | |
34 // network is already connected, connecting, or activating. | |
35 // CONNECT_STARTED if a connection attempt was started. | |
36 ConnectResult ConnectToNetwork(const std::string& service_path, | |
37 gfx::NativeWindow parent_window); | |
38 | 32 |
39 // Handle an unconfigured network which might do any of the following: | 33 // Handle an unconfigured network which might do any of the following: |
40 // * Configure and connect to the network with a matching cert but without | 34 // * Configure and connect to the network with a matching cert but without |
pneubeck (no reviews)
2013/08/06 15:45:19
you changed the behavior of this function:
it does
stevenjb
2013/08/06 20:23:55
Done.
| |
41 // pcks11id and tpm pin / slot configured. | 35 // pcks11id and tpm pin / slot configured. |
42 // * Show the enrollment dialog for the network. | 36 // * Show the enrollment dialog for the network. |
43 // * Show the configuration dialog for the network. | 37 // * Show the configuration dialog for the network. |
44 // * Show the activation dialog for the network. | 38 // * Show the activation dialog for the network. |
45 // * Show the settings UI for the network. | 39 // * Show the settings UI for the network. |
46 void HandleUnconfiguredNetwork(const std::string& service_path, | 40 void HandleUnconfiguredNetwork(const std::string& service_path, |
47 gfx::NativeWindow parent_window); | 41 gfx::NativeWindow parent_window); |
48 | 42 |
43 // If the network UIData has a matching enrollment URL, triggers the enrollment | |
44 // dialog and returns true. | |
45 bool EnrollNetwork(const std::string& service_path, | |
46 gfx::NativeWindow parent_window); | |
47 | |
48 // Looks up the policy for |network| for the current active user and sets | |
49 // |onc_source| accordingly. | |
50 const base::DictionaryValue* FindPolicyForActiveUser( | |
51 const NetworkState* network, | |
52 onc::ONCSource* onc_source); | |
53 | |
49 } // namespace network_connect | 54 } // namespace network_connect |
50 } // namespace chromeos | 55 } // namespace chromeos |
51 | 56 |
52 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_ |
OLD | NEW |