Chromium Code Reviews| 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 // Handles connect request failures for |service_path| based on |error_name|. | |
| 67 // Shows the configuration UI and returns true if the network might not be | |
| 68 // configured, otherwise does nothing and returns false. | |
| 69 virtual bool HandleConnectFailed(const std::string& service_path, | |
|
pneubeck (no reviews)
2015/08/06 09:52:01
if possible, please consider giving this function
stevenjb
2015/08/07 17:39:37
Renamed MaybeShowConfigureUI.
| |
| 70 const std::string& error_name) = 0; | |
| 71 | |
| 66 // Enables or disables a network technology. If |technology| refers to | 72 // 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 | 73 // cellular and the device cannot be enabled due to a SIM lock, this function |
| 68 // will launch the SIM unlock dialog. | 74 // will launch the SIM unlock dialog. |
| 69 virtual void SetTechnologyEnabled( | 75 virtual void SetTechnologyEnabled( |
| 70 const chromeos::NetworkTypePattern& technology, | 76 const chromeos::NetworkTypePattern& technology, |
| 71 bool enabled_state) = 0; | 77 bool enabled_state) = 0; |
| 72 | 78 |
| 73 // Requests network activation and handles any errors and notifications. | 79 // Requests network activation and handles any errors and notifications. |
| 74 virtual void ActivateCellular(const std::string& service_path) = 0; | 80 virtual void ActivateCellular(const std::string& service_path) = 0; |
| 75 | 81 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 protected: | 114 protected: |
| 109 NetworkConnect(); | 115 NetworkConnect(); |
| 110 | 116 |
| 111 private: | 117 private: |
| 112 DISALLOW_COPY_AND_ASSIGN(NetworkConnect); | 118 DISALLOW_COPY_AND_ASSIGN(NetworkConnect); |
| 113 }; | 119 }; |
| 114 | 120 |
| 115 } // ui | 121 } // ui |
| 116 | 122 |
| 117 #endif // UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H | 123 #endif // UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
| OLD | NEW |