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

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

Issue 11630004: DevTools: rename debugger/ to devtools/, move DevTools files into content/renderer/devtools. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: For landing Created 8 years 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
(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_TRACING_HANDLER_H_
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_TRACING_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 DevToolsTracingHandler
16 : public TraceSubscriber,
17 public DevToolsBrowserTarget::Handler {
18 public:
19 DevToolsTracingHandler();
20 virtual ~DevToolsTracingHandler();
21
22 // TraceSubscriber:
23 virtual void OnEndTracingComplete() OVERRIDE;;
24 virtual void OnTraceDataCollected(
25 const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE;
26
27 // DevToolBrowserTarget::Handler:
28 virtual std::string Domain() OVERRIDE;
29 virtual base::Value* OnProtocolCommand(
30 const std::string& method,
31 const base::DictionaryValue* params,
32 base::Value** error_out) OVERRIDE;
33
34 private:
35 base::Value* Start(const base::DictionaryValue* params);
36 base::Value* End(const base::DictionaryValue* params);
37 base::Value* HasCompleted(const base::DictionaryValue* params);
38 base::Value* GetTraceAndReset(const base::DictionaryValue* params);
39
40 bool has_completed_;
41
42 std::vector<std::string> buffer_;
43 int buffer_data_size_;
44
45 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_TRACING_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/debugger/devtools_resources.gyp ('k') | content/browser/debugger/devtools_tracing_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698