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

Side by Side Diff: content/browser/devtools/devtools_tracing_handler.h

Issue 12218134: Introduce intercepting and handling devtools messages in the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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 | Annotate | Revision Log
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 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
7 7
8 #include "content/browser/devtools/devtools_browser_target.h" 8 #include "content/browser/devtools/devtools_browser_target.h"
9 #include "content/browser/devtools/devtools_protocol.h"
9 #include "content/public/browser/trace_subscriber.h" 10 #include "content/public/browser/trace_subscriber.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 class DevToolsWebSocketSender; 14 class DevToolsWebSocketSender;
14 15
15 // This class bridges DevTools remote debugging server with the trace 16 // This class bridges DevTools remote debugging server with the trace
16 // infrastructure. 17 // infrastructure.
17 class DevToolsTracingHandler 18 class DevToolsTracingHandler
18 : public TraceSubscriber, 19 : public TraceSubscriber,
19 public DevToolsBrowserTarget::DomainHandler { 20 public DevToolsBrowserTarget::DomainHandler {
20 public: 21 public:
21 DevToolsTracingHandler(); 22 DevToolsTracingHandler(const DevToolsProtocol::Notifier& notifier);
22 virtual ~DevToolsTracingHandler(); 23 virtual ~DevToolsTracingHandler();
23 24
24 // TraceSubscriber: 25 // TraceSubscriber:
25 virtual void OnEndTracingComplete() OVERRIDE;; 26 virtual void OnEndTracingComplete() OVERRIDE;;
26 virtual void OnTraceDataCollected( 27 virtual void OnTraceDataCollected(
27 const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE; 28 const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE;
28 29
29 private: 30 private:
30 scoped_ptr<DevToolsProtocol::Response> OnStart( 31 scoped_ptr<DevToolsProtocol::Response> OnStart(
31 DevToolsProtocol::Command* command); 32 DevToolsProtocol::Command* command);
32 scoped_ptr<DevToolsProtocol::Response> OnEnd( 33 scoped_ptr<DevToolsProtocol::Response> OnEnd(
33 DevToolsProtocol::Command* command); 34 DevToolsProtocol::Command* command);
34 35
35 bool is_running_; 36 bool is_running_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler); 38 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler);
38 }; 39 };
39 40
40 } // namespace content 41 } // namespace content
41 42
42 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_ 43 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698