| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINU
X_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINU
X_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINU
X_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINU
X_H_ |
| 7 | 7 |
| 8 #include "base/memory/linked_ptr.h" | 8 #include "base/memory/linked_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Must be called on |dbus_thread_|. | 113 // Must be called on |dbus_thread_|. |
| 114 void GetAllWiFiAccessPoints(bool configured_only, | 114 void GetAllWiFiAccessPoints(bool configured_only, |
| 115 bool visible_only, | 115 bool visible_only, |
| 116 int limit, | 116 int limit, |
| 117 NetworkMap* network_map); | 117 NetworkMap* network_map); |
| 118 | 118 |
| 119 // Initiates the connection to the network. | 119 // Initiates the connection to the network. |
| 120 // Must be called on |dbus_thread_|. | 120 // Must be called on |dbus_thread_|. |
| 121 void ConnectToNetwork(const std::string& guid, std::string* error); | 121 void ConnectToNetwork(const std::string& guid, std::string* error); |
| 122 | 122 |
| 123 // Initiates disconnection from the specified network. |
| 124 // Must be called on |dbus_thread_| |
| 125 void DisconnectFromNetwork(const std::string& guid, std::string* error); |
| 126 |
| 123 // Checks whether the current thread is the DBus thread. If not, DCHECK will | 127 // Checks whether the current thread is the DBus thread. If not, DCHECK will |
| 124 // fail. | 128 // fail. |
| 125 void AssertOnDBusThread(); | 129 void AssertOnDBusThread(); |
| 126 | 130 |
| 127 // Verifies that NetworkManager interfaces are initialized. | 131 // Verifies that NetworkManager interfaces are initialized. |
| 128 // Returns true if NetworkManager is initialized, otherwise returns false | 132 // Returns true if NetworkManager is initialized, otherwise returns false |
| 129 // and the API call will fail with |kErrorNotSupported|. | 133 // and the API call will fail with |kErrorNotSupported|. |
| 130 bool CheckNetworkManagerSupported(const FailureCallback& failure_callback); | 134 bool CheckNetworkManagerSupported(const FailureCallback& failure_callback); |
| 131 | 135 |
| 132 // Gets all network devices on the system. | 136 // Gets all network devices on the system. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 scoped_refptr<base::SequencedTaskRunner> dbus_task_runner_; | 207 scoped_refptr<base::SequencedTaskRunner> dbus_task_runner_; |
| 204 // This is owned by |dbus_| object. Only access on |dbus_thread_|. | 208 // This is owned by |dbus_| object. Only access on |dbus_thread_|. |
| 205 dbus::ObjectProxy* network_manager_proxy_; | 209 dbus::ObjectProxy* network_manager_proxy_; |
| 206 | 210 |
| 207 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateLinux); | 211 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateLinux); |
| 208 }; | 212 }; |
| 209 | 213 |
| 210 } // namespace extensions | 214 } // namespace extensions |
| 211 | 215 |
| 212 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_L
INUX_H_ | 216 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_L
INUX_H_ |
| OLD | NEW |