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

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

Issue 2139363003: [DevTools] Cleanup v8_inspector API part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 5 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) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #ifndef WorkerThreadDebugger_h 31 #ifndef WorkerThreadDebugger_h
32 #define WorkerThreadDebugger_h 32 #define WorkerThreadDebugger_h
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/inspector/ThreadDebugger.h" 35 #include "core/inspector/ThreadDebugger.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class ConsoleMessage;
39 class SourceLocation; 40 class SourceLocation;
40 class WorkerThread; 41 class WorkerThread;
41 42
42 class CORE_EXPORT WorkerThreadDebugger final : public ThreadDebugger { 43 class CORE_EXPORT WorkerThreadDebugger final : public ThreadDebugger {
43 WTF_MAKE_NONCOPYABLE(WorkerThreadDebugger); 44 WTF_MAKE_NONCOPYABLE(WorkerThreadDebugger);
44 public: 45 public:
45 explicit WorkerThreadDebugger(WorkerThread*, v8::Isolate*); 46 explicit WorkerThreadDebugger(WorkerThread*, v8::Isolate*);
46 ~WorkerThreadDebugger() override; 47 ~WorkerThreadDebugger() override;
47 48
48 static WorkerThreadDebugger* from(v8::Isolate*); 49 static WorkerThreadDebugger* from(v8::Isolate*);
49 50
50 int contextGroupId(); 51 int contextGroupId();
51 void contextCreated(v8::Local<v8::Context>); 52 void contextCreated(v8::Local<v8::Context>);
52 void contextWillBeDestroyed(v8::Local<v8::Context>); 53 void contextWillBeDestroyed(v8::Local<v8::Context>);
53 void exceptionThrown(const String& errorMessage, std::unique_ptr<SourceLocat ion>); 54 void exceptionThrown(const String& errorMessage, std::unique_ptr<SourceLocat ion>);
55 void addConsoleMessage(ConsoleMessage*);
54 56
55 // V8DebuggerClient implementation. 57 // V8DebuggerClient implementation.
56 void runMessageLoopOnPause(int contextGroupId) override; 58 void runMessageLoopOnPause(int contextGroupId) override;
57 void quitMessageLoopOnPause() override; 59 void quitMessageLoopOnPause() override;
58 void muteWarningsAndDeprecations() override { }; 60 void muteWarningsAndDeprecations() override;
59 void unmuteWarningsAndDeprecations() override { }; 61 void unmuteWarningsAndDeprecations() override;
60 bool callingContextCanAccessContext(v8::Local<v8::Context> calling, v8::Loca l<v8::Context> target) override; 62 bool callingContextCanAccessContext(v8::Local<v8::Context> calling, v8::Loca l<v8::Context> target) override;
61 v8::Local<v8::Context> ensureDefaultContextInGroup(int contextGroupId) overr ide; 63 v8::Local<v8::Context> ensureDefaultContextInGroup(int contextGroupId) overr ide;
62 64
63 v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*, v8::Local<v8::Context>) o verride; 65 v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*, v8::Local<v8::Context>) o verride;
64 void messageAddedToConsole(int contextGroupId, MessageSource, MessageLevel, const String16& message, const String16& url, unsigned lineNumber, unsigned colu mnNumber, V8StackTrace*) override; 66 void messageAddedToConsole(int contextGroupId, MessageSource, MessageLevel, const String16& message, const String16& url, unsigned lineNumber, unsigned colu mnNumber, V8StackTrace*) override;
65 67
66 private: 68 private:
67 WorkerThread* m_workerThread; 69 WorkerThread* m_workerThread;
70 int m_muteConsoleCount;
68 }; 71 };
69 72
70 } // namespace blink 73 } // namespace blink
71 74
72 #endif // WorkerThreadDebugger_h 75 #endif // WorkerThreadDebugger_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698