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

Side by Side Diff: content/browser/devtools/devtools_agent_host_impl.cc

Issue 2361613002: DevTools: untangle device discovery request from the devtools android bridge. (Closed)
Patch Set: make device hosts profile-independent, plump browser context for inspect. Created 4 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 (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 #include "content/browser/devtools/devtools_agent_host_impl.h" 5 #include "content/browser/devtools/devtools_agent_host_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 WebContents* DevToolsAgentHostImpl::GetWebContents() { 212 WebContents* DevToolsAgentHostImpl::GetWebContents() {
213 return NULL; 213 return NULL;
214 } 214 }
215 215
216 void DevToolsAgentHostImpl::DisconnectWebContents() { 216 void DevToolsAgentHostImpl::DisconnectWebContents() {
217 } 217 }
218 218
219 void DevToolsAgentHostImpl::ConnectWebContents(WebContents* wc) { 219 void DevToolsAgentHostImpl::ConnectWebContents(WebContents* wc) {
220 } 220 }
221 221
222 bool DevToolsAgentHostImpl::Inspect() { 222 bool DevToolsAgentHostImpl::Inspect(BrowserContext* context) {
223 DevToolsManager* manager = DevToolsManager::GetInstance(); 223 DevToolsManager* manager = DevToolsManager::GetInstance();
224 if (manager->delegate()) { 224 if (manager->delegate()) {
225 manager->delegate()->Inspect(this); 225 manager->delegate()->Inspect(this, context);
226 return true; 226 return true;
227 } 227 }
228 return false; 228 return false;
229 } 229 }
230 230
231 void DevToolsAgentHostImpl::SendProtocolResponse(int session_id, 231 void DevToolsAgentHostImpl::SendProtocolResponse(int session_id,
232 const std::string& message) { 232 const std::string& message) {
233 SendMessageToClient(session_id, message); 233 SendMessageToClient(session_id, message);
234 } 234 }
235 235
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 if (message_buffer_.size() != message_buffer_size_) 354 if (message_buffer_.size() != message_buffer_size_)
355 return false; 355 return false;
356 callback_.Run(chunk.session_id, message_buffer_); 356 callback_.Run(chunk.session_id, message_buffer_);
357 message_buffer_ = std::string(); 357 message_buffer_ = std::string();
358 message_buffer_size_ = 0; 358 message_buffer_size_ = 0;
359 } 359 }
360 return true; 360 return true;
361 } 361 }
362 362
363 } // namespace content 363 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698