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_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "net/socket/tcp_client_socket.h" | 15 #include "net/socket/tcp_client_socket.h" |
16 | 16 |
17 namespace base { | 17 namespace base { |
18 class MessageLoop; | 18 class MessageLoop; |
19 class DictionaryValue; | 19 class DictionaryValue; |
20 class Thread; | 20 class Thread; |
21 } | 21 } |
22 | 22 |
23 class Profile; | 23 class Profile; |
24 | 24 |
| 25 // The format used for constructing DevTools server socket names. |
| 26 extern const char kDevToolsChannelNameFormat[]; |
| 27 |
25 class DevToolsAdbBridge { | 28 class DevToolsAdbBridge { |
26 public: | 29 public: |
27 typedef base::Callback<void(int result, | 30 typedef base::Callback<void(int result, |
28 const std::string& response)> Callback; | 31 const std::string& response)> Callback; |
29 | 32 |
30 class RemotePage : public base::RefCounted<RemotePage> { | 33 class RemotePage : public base::RefCounted<RemotePage> { |
31 public: | 34 public: |
32 RemotePage(const std::string& serial, | 35 RemotePage(const std::string& serial, |
33 const std::string& model, | 36 const std::string& model, |
34 const std::string& package, | 37 const std::string& package, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 }; | 100 }; |
98 | 101 |
99 Profile* profile_; | 102 Profile* profile_; |
100 scoped_refptr<RefCountedAdbThread> adb_thread_; | 103 scoped_refptr<RefCountedAdbThread> adb_thread_; |
101 base::WeakPtrFactory<DevToolsAdbBridge> weak_factory_; | 104 base::WeakPtrFactory<DevToolsAdbBridge> weak_factory_; |
102 bool has_message_loop_; | 105 bool has_message_loop_; |
103 DISALLOW_COPY_AND_ASSIGN(DevToolsAdbBridge); | 106 DISALLOW_COPY_AND_ASSIGN(DevToolsAdbBridge); |
104 }; | 107 }; |
105 | 108 |
106 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ | 109 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ |
OLD | NEW |