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 UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 5 #ifndef UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
6 #define UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 6 #define UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Returns the global NetworkConnect object if initialized or NULL. | 56 // Returns the global NetworkConnect object if initialized or NULL. |
57 static NetworkConnect* Get(); | 57 static NetworkConnect* Get(); |
58 | 58 |
59 static const char kErrorActivateFailed[]; | 59 static const char kErrorActivateFailed[]; |
60 | 60 |
61 virtual ~NetworkConnect(); | 61 virtual ~NetworkConnect(); |
62 | 62 |
63 // Requests a network connection and handles any errors and notifications. | 63 // Requests a network connection and handles any errors and notifications. |
64 virtual void ConnectToNetwork(const std::string& service_path) = 0; | 64 virtual void ConnectToNetwork(const std::string& service_path) = 0; |
65 | 65 |
| 66 // Maybe show the configuration UI after a connect failure based on the |
| 67 // network state and error name. Returns true if the UI is shown. |
| 68 virtual bool MaybeShowConfigureUI(const std::string& service_path, |
| 69 const std::string& connect_error) = 0; |
| 70 |
66 // Enables or disables a network technology. If |technology| refers to | 71 // Enables or disables a network technology. If |technology| refers to |
67 // cellular and the device cannot be enabled due to a SIM lock, this function | 72 // cellular and the device cannot be enabled due to a SIM lock, this function |
68 // will launch the SIM unlock dialog. | 73 // will launch the SIM unlock dialog. |
69 virtual void SetTechnologyEnabled( | 74 virtual void SetTechnologyEnabled( |
70 const chromeos::NetworkTypePattern& technology, | 75 const chromeos::NetworkTypePattern& technology, |
71 bool enabled_state) = 0; | 76 bool enabled_state) = 0; |
72 | 77 |
73 // Requests network activation and handles any errors and notifications. | 78 // Requests network activation and handles any errors and notifications. |
74 virtual void ActivateCellular(const std::string& service_path) = 0; | 79 virtual void ActivateCellular(const std::string& service_path) = 0; |
75 | 80 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 protected: | 113 protected: |
109 NetworkConnect(); | 114 NetworkConnect(); |
110 | 115 |
111 private: | 116 private: |
112 DISALLOW_COPY_AND_ASSIGN(NetworkConnect); | 117 DISALLOW_COPY_AND_ASSIGN(NetworkConnect); |
113 }; | 118 }; |
114 | 119 |
115 } // ui | 120 } // ui |
116 | 121 |
117 #endif // UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 122 #endif // UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
OLD | NEW |