Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: tools/android/forwarder2/host_controller.h

Issue 15008004: Add device port unmapping support to forwarder2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address David's comments Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/android/forwarder2/forwarder.cc ('k') | tools/android/forwarder2/host_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/forwarder2/host_controller.h
diff --git a/tools/android/forwarder2/host_controller.h b/tools/android/forwarder2/host_controller.h
index b4409eb4e5333e50d8b3e18755c83739c6bcb4ba..aa7c0e2237a0166bd0823123dc3ffb02d6fd2a17 100644
--- a/tools/android/forwarder2/host_controller.h
+++ b/tools/android/forwarder2/host_controller.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "tools/android/forwarder2/pipe_notifier.h"
#include "tools/android/forwarder2/socket.h"
#include "tools/android/forwarder2/thread.h"
@@ -43,14 +44,21 @@ class HostController : public Thread {
private:
void StartForwarder(scoped_ptr<Socket> host_server_data_socket_ptr);
+ // Helper method that creates a socket and adds the appropriate event file
+ // descriptors.
+ scoped_ptr<Socket> CreateSocket();
+
Socket adb_control_socket_;
int device_port_;
const std::string forward_to_host_;
const int forward_to_host_port_;
const int adb_port_;
- // Used to notify the controller to exit.
- const int exit_notifier_fd_;
+ // Used to notify the controller when the process is killed.
+ const int global_exit_notifier_fd_;
+ // Used to cancel the pending blocking IO operations when the host controller
+ // instance is deleted.
+ PipeNotifier delete_controller_notifier_;
bool ready_;
« no previous file with comments | « tools/android/forwarder2/forwarder.cc ('k') | tools/android/forwarder2/host_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698