OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_TRACE_HANDLER_H_ | |
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_TRACE_HANDLER_H_ | |
7 | |
8 #include "content/browser/debugger/devtools_browser_target.h" | |
9 #include "content/public/browser/trace_subscriber.h" | |
10 | |
11 namespace content { | |
12 | |
13 // This class bridges DevTools remote debugging server with the trace | |
14 // infrastructure. | |
15 class DevToolsTraceDomainHandler | |
16 : public TraceSubscriber, | |
17 public DevToolsBrowserTarget::Handler { | |
18 public: | |
19 DevToolsTraceDomainHandler(); | |
20 ~DevToolsTraceDomainHandler(); | |
pfeldman
2012/12/14 10:39:33
virtual
bulach
2012/12/14 16:03:52
Done.
| |
21 | |
22 // TraceSubscriber: | |
23 virtual void OnEndTracingComplete(); | |
24 virtual void OnTraceDataCollected( | |
25 const scoped_refptr<base::RefCountedString>& trace_fragment); | |
26 | |
27 // DevToolBrowserTarget::Handler: | |
28 virtual base::Value* OnProtocolCommand( | |
29 int connection_id, | |
30 int request_id, | |
31 const std::string& method, | |
32 const base::DictionaryValue* params) OVERRIDE; | |
33 | |
34 private: | |
35 base::Value* BeginTracing(const base::DictionaryValue* params); | |
36 base::Value* EndTracingAsync(const base::DictionaryValue* params); | |
37 base::Value* HasCompleted(const base::DictionaryValue* params); | |
38 base::Value* GetAndResetTrace(const base::DictionaryValue* params); | |
39 | |
40 bool has_completed_; | |
41 | |
42 std::string buffer_; | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(DevToolsTraceDomainHandler); | |
45 }; | |
46 | |
47 } // namespace content | |
48 | |
49 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_TRACE_HANDLER_H_ | |
OLD | NEW |