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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.h

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 2 Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 26 matching lines...) Expand all
37 #include "wtf/PassOwnPtr.h" 37 #include "wtf/PassOwnPtr.h"
38 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class ExecutionContext; 42 class ExecutionContext;
43 class InspectorFrontend; 43 class InspectorFrontend;
44 class V8Debugger; 44 class V8Debugger;
45 class V8ProfilerAgent; 45 class V8ProfilerAgent;
46 46
47 typedef String ErrorString;
48
49 class CORE_EXPORT InspectorProfilerAgent final : public InspectorBaseAgent<Inspe ctorProfilerAgent, protocol::Frontend::Profiler>, public protocol::Dispatcher::P rofilerCommandHandler { 47 class CORE_EXPORT InspectorProfilerAgent final : public InspectorBaseAgent<Inspe ctorProfilerAgent, protocol::Frontend::Profiler>, public protocol::Dispatcher::P rofilerCommandHandler {
50 WTF_MAKE_NONCOPYABLE(InspectorProfilerAgent); 48 WTF_MAKE_NONCOPYABLE(InspectorProfilerAgent);
51 USING_FAST_MALLOC_WILL_BE_REMOVED(InspectorProfilerAgent); 49 USING_FAST_MALLOC_WILL_BE_REMOVED(InspectorProfilerAgent);
52 public: 50 public:
53 class Client { 51 class Client {
54 public: 52 public:
55 virtual ~Client() { } 53 virtual ~Client() { }
56 virtual void profilingStarted() { } 54 virtual void profilingStarted() { }
57 virtual void profilingStopped() { } 55 virtual void profilingStopped() { }
58 }; 56 };
59 57
60 static PassOwnPtrWillBeRawPtr<InspectorProfilerAgent> create(V8Debugger*, Cl ient*); 58 static PassOwnPtrWillBeRawPtr<InspectorProfilerAgent> create(V8Debugger*, Cl ient*);
61 ~InspectorProfilerAgent() override; 59 ~InspectorProfilerAgent() override;
62 DECLARE_VIRTUAL_TRACE(); 60 DECLARE_VIRTUAL_TRACE();
63 61
64 // InspectorBaseAgent overrides. 62 // InspectorBaseAgent overrides.
65 void setState(protocol::DictionaryValue*) override; 63 void setState(protocol::DictionaryValue*) override;
66 void setFrontend(protocol::Frontend*) override; 64 void setFrontend(protocol::Frontend*) override;
67 void clearFrontend() override; 65 void clearFrontend() override;
68 void restore() override; 66 void restore() override;
69 67
70 void consoleProfile(ExecutionContext*, const String& title); 68 void consoleProfile(ExecutionContext*, const String16& title);
71 void consoleProfileEnd(const String& title); 69 void consoleProfileEnd(const String16& title);
72 70
73 void enable(ErrorString*) override; 71 void enable(ErrorString*) override;
74 void disable(ErrorString*) override; 72 void disable(ErrorString*) override;
75 void setSamplingInterval(ErrorString*, int) override; 73 void setSamplingInterval(ErrorString*, int) override;
76 void start(ErrorString*) override; 74 void start(ErrorString*) override;
77 void stop(ErrorString*, OwnPtr<protocol::Profiler::CPUProfile>*) override; 75 void stop(ErrorString*, OwnPtr<protocol::Profiler::CPUProfile>*) override;
78 76
79 void willProcessTask(); 77 void willProcessTask();
80 void didProcessTask(); 78 void didProcessTask();
81 void willEnterNestedRunLoop(); 79 void willEnterNestedRunLoop();
82 void didLeaveNestedRunLoop(); 80 void didLeaveNestedRunLoop();
83 81
84 private: 82 private:
85 InspectorProfilerAgent(V8Debugger*, Client*); 83 InspectorProfilerAgent(V8Debugger*, Client*);
86 84
87 Client* m_client; 85 Client* m_client;
88 OwnPtr<V8ProfilerAgent> m_v8ProfilerAgent; 86 OwnPtr<V8ProfilerAgent> m_v8ProfilerAgent;
89 }; 87 };
90 88
91 } // namespace blink 89 } // namespace blink
92 90
93 91
94 #endif // !defined(InspectorProfilerAgent_h) 92 #endif // !defined(InspectorProfilerAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698