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

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

Issue 11958010: DevTools: brush up remote debugging browser target: use callbacks, make handlers implementation a m… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments addressed (left error handling order in place) Created 7 years, 11 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/public/browser/trace_subscriber.h" 9 #include "content/public/browser/trace_subscriber.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class DevToolsWebSocketSender; 13 class DevToolsWebSocketSender;
14 14
15 // This class bridges DevTools remote debugging server with the trace 15 // This class bridges DevTools remote debugging server with the trace
16 // infrastructure. 16 // infrastructure.
17 class DevToolsTracingHandler 17 class DevToolsTracingHandler
18 : public TraceSubscriber, 18 : public TraceSubscriber,
19 public DevToolsBrowserTarget::Handler { 19 public DevToolsBrowserTarget::DomainHandler {
20 public: 20 public:
21 DevToolsTracingHandler(); 21 DevToolsTracingHandler();
22 virtual ~DevToolsTracingHandler(); 22 virtual ~DevToolsTracingHandler();
23 23
24 // TraceSubscriber: 24 // TraceSubscriber:
25 virtual void OnEndTracingComplete() OVERRIDE;; 25 virtual void OnEndTracingComplete() OVERRIDE;;
26 virtual void OnTraceDataCollected( 26 virtual void OnTraceDataCollected(
27 const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE; 27 const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE;
28 28
29 // DevToolBrowserTarget::Handler:
30 virtual std::string Domain() OVERRIDE;
31 virtual base::Value* OnProtocolCommand(
32 const std::string& method,
33 const base::DictionaryValue* params,
34 base::Value** error_out) OVERRIDE;
35
36 private: 29 private:
37 base::Value* Start(const base::DictionaryValue* params); 30 base::DictionaryValue* OnStart(const base::DictionaryValue* params,
38 base::Value* End(const base::DictionaryValue* params); 31 base::Value** error_out);
39 void SendNotification(const std::string& method, const std::string& value); 32 base::DictionaryValue* OnEnd(const base::DictionaryValue* params,
33 base::Value** error_out);
40 34
41 bool is_running_; 35 bool is_running_;
42 36
43 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler); 37 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler);
44 }; 38 };
45 39
46 } // namespace content 40 } // namespace content
47 41
48 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_ 42 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_http_handler_impl.cc ('k') | content/browser/devtools/devtools_tracing_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698