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

Side by Side Diff: chrome/browser/devtools/device/devtools_android_bridge.h

Issue 521573002: Support for browser aliases in DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 typedef base::Callback<void(RemotePage*)> RemotePageCallback; 83 typedef base::Callback<void(RemotePage*)> RemotePageCallback;
84 typedef base::Callback<void(int, const std::string&)> JsonRequestCallback; 84 typedef base::Callback<void(int, const std::string&)> JsonRequestCallback;
85 typedef AndroidDeviceManager::Device Device; 85 typedef AndroidDeviceManager::Device Device;
86 typedef AndroidDeviceManager::AndroidWebSocket AndroidWebSocket; 86 typedef AndroidDeviceManager::AndroidWebSocket AndroidWebSocket;
87 87
88 class RemoteBrowser : public base::RefCounted<RemoteBrowser> { 88 class RemoteBrowser : public base::RefCounted<RemoteBrowser> {
89 public: 89 public:
90 RemoteBrowser(scoped_refptr<Device> device, 90 RemoteBrowser(scoped_refptr<Device> device,
91 const AndroidDeviceManager::BrowserInfo& browser_info); 91 const AndroidDeviceManager::BrowserInfo& browser_info);
92 92
93 int GetId() const { return id_; }
94
93 std::string serial() { return device_->serial(); } 95 std::string serial() { return device_->serial(); }
94 std::string socket() { return socket_; } 96 std::string socket() { return socket_; }
95 97
96 std::string display_name() { return display_name_; } 98 std::string display_name() { return display_name_; }
97 void set_display_name(const std::string& name) { display_name_ = name; } 99 void set_display_name(const std::string& name) { display_name_ = name; }
98 100
99 std::string version() { return version_; } 101 std::string version() { return version_; }
100 void set_version(const std::string& version) { version_ = version; } 102 void set_version(const std::string& version) { version_ = version; }
101 103
102 bool IsChrome() const; 104 bool IsChrome() const;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void NavigatePageOnUIThread(const JsonRequestCallback& callback, 141 void NavigatePageOnUIThread(const JsonRequestCallback& callback,
140 int result, 142 int result,
141 const std::string& response, 143 const std::string& response,
142 const std::string& url); 144 const std::string& url);
143 145
144 void RespondToOpenOnUIThread( 146 void RespondToOpenOnUIThread(
145 const DevToolsAndroidBridge::RemotePageCallback& callback, 147 const DevToolsAndroidBridge::RemotePageCallback& callback,
146 int result, 148 int result,
147 const std::string& response); 149 const std::string& response);
148 150
151 const int id_;
149 scoped_refptr<Device> device_; 152 scoped_refptr<Device> device_;
150 const std::string socket_; 153 const std::string socket_;
151 std::string display_name_; 154 std::string display_name_;
152 const AndroidDeviceManager::BrowserInfo::Type type_; 155 const AndroidDeviceManager::BrowserInfo::Type type_;
153 std::string version_; 156 std::string version_;
154 scoped_ptr<base::ListValue> page_descriptors_; 157 scoped_ptr<base::ListValue> page_descriptors_;
155 158
156 DISALLOW_COPY_AND_ASSIGN(RemoteBrowser); 159 DISALLOW_COPY_AND_ASSIGN(RemoteBrowser);
157 }; 160 };
158 161
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 typedef std::vector<DeviceCountListener*> DeviceCountListeners; 255 typedef std::vector<DeviceCountListener*> DeviceCountListeners;
253 DeviceCountListeners device_count_listeners_; 256 DeviceCountListeners device_count_listeners_;
254 base::CancelableCallback<void(int)> device_count_callback_; 257 base::CancelableCallback<void(int)> device_count_callback_;
255 base::Callback<void(const base::Closure&)> task_scheduler_; 258 base::Callback<void(const base::Closure&)> task_scheduler_;
256 259
257 PrefChangeRegistrar pref_change_registrar_; 260 PrefChangeRegistrar pref_change_registrar_;
258 DISALLOW_COPY_AND_ASSIGN(DevToolsAndroidBridge); 261 DISALLOW_COPY_AND_ASSIGN(DevToolsAndroidBridge);
259 }; 262 };
260 263
261 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ 264 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698