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

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

Issue 1342833004: Enable DevTools method for cross-process memory notification suppressing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove asynchronous callback Created 5 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
« no previous file with comments | « content/browser/devtools/browser_devtools_agent_host.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/devtools/browser_devtools_agent_host.h" 5 #include "content/browser/devtools/browser_devtools_agent_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/devtools/devtools_protocol_handler.h" 8 #include "content/browser/devtools/devtools_protocol_handler.h"
9 #include "content/browser/devtools/protocol/io_handler.h" 9 #include "content/browser/devtools/protocol/io_handler.h"
10 #include "content/browser/devtools/protocol/memory_handler.h"
10 #include "content/browser/devtools/protocol/system_info_handler.h" 11 #include "content/browser/devtools/protocol/system_info_handler.h"
11 #include "content/browser/devtools/protocol/tethering_handler.h" 12 #include "content/browser/devtools/protocol/tethering_handler.h"
12 #include "content/browser/devtools/protocol/tracing_handler.h" 13 #include "content/browser/devtools/protocol/tracing_handler.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::CreateForBrowser( 17 scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::CreateForBrowser(
17 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner, 18 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner,
18 const CreateServerSocketCallback& socket_callback) { 19 const CreateServerSocketCallback& socket_callback) {
19 return new BrowserDevToolsAgentHost(tethering_task_runner, socket_callback); 20 return new BrowserDevToolsAgentHost(tethering_task_runner, socket_callback);
20 } 21 }
21 22
22 BrowserDevToolsAgentHost::BrowserDevToolsAgentHost( 23 BrowserDevToolsAgentHost::BrowserDevToolsAgentHost(
23 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner, 24 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner,
24 const CreateServerSocketCallback& socket_callback) 25 const CreateServerSocketCallback& socket_callback)
25 : io_handler_(new devtools::io::IOHandler(GetIOContext())), 26 : io_handler_(new devtools::io::IOHandler(GetIOContext())),
27 memory_handler_(new devtools::memory::MemoryHandler()),
26 system_info_handler_(new devtools::system_info::SystemInfoHandler()), 28 system_info_handler_(new devtools::system_info::SystemInfoHandler()),
27 tethering_handler_( 29 tethering_handler_(
28 new devtools::tethering::TetheringHandler(socket_callback, 30 new devtools::tethering::TetheringHandler(socket_callback,
29 tethering_task_runner)), 31 tethering_task_runner)),
30 tracing_handler_(new devtools::tracing::TracingHandler( 32 tracing_handler_(new devtools::tracing::TracingHandler(
31 devtools::tracing::TracingHandler::Browser, GetIOContext())), 33 devtools::tracing::TracingHandler::Browser, GetIOContext())),
32 protocol_handler_(new DevToolsProtocolHandler( 34 protocol_handler_(new DevToolsProtocolHandler(
33 this, 35 this,
34 base::Bind(&BrowserDevToolsAgentHost::SendMessageToClient, 36 base::Bind(&BrowserDevToolsAgentHost::SendMessageToClient,
35 base::Unretained(this)))) { 37 base::Unretained(this)))) {
36 DevToolsProtocolDispatcher* dispatcher = protocol_handler_->dispatcher(); 38 DevToolsProtocolDispatcher* dispatcher = protocol_handler_->dispatcher();
37 dispatcher->SetIOHandler(io_handler_.get()); 39 dispatcher->SetIOHandler(io_handler_.get());
40 dispatcher->SetMemoryHandler(memory_handler_.get());
38 dispatcher->SetSystemInfoHandler(system_info_handler_.get()); 41 dispatcher->SetSystemInfoHandler(system_info_handler_.get());
39 dispatcher->SetTetheringHandler(tethering_handler_.get()); 42 dispatcher->SetTetheringHandler(tethering_handler_.get());
40 dispatcher->SetTracingHandler(tracing_handler_.get()); 43 dispatcher->SetTracingHandler(tracing_handler_.get());
41 } 44 }
42 45
43 BrowserDevToolsAgentHost::~BrowserDevToolsAgentHost() { 46 BrowserDevToolsAgentHost::~BrowserDevToolsAgentHost() {
44 } 47 }
45 48
46 void BrowserDevToolsAgentHost::Attach() { 49 void BrowserDevToolsAgentHost::Attach() {
47 } 50 }
(...skipping 21 matching lines...) Expand all
69 return false; 72 return false;
70 } 73 }
71 74
72 bool BrowserDevToolsAgentHost::DispatchProtocolMessage( 75 bool BrowserDevToolsAgentHost::DispatchProtocolMessage(
73 const std::string& message) { 76 const std::string& message) {
74 protocol_handler_->HandleMessage(message); 77 protocol_handler_->HandleMessage(message);
75 return true; 78 return true;
76 } 79 }
77 80
78 } // content 81 } // content
OLDNEW
« no previous file with comments | « content/browser/devtools/browser_devtools_agent_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698