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

Side by Side Diff: Source/core/inspector/PageConsoleAgent.h

Issue 898593002: DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed assertion Created 5 years, 10 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 /* 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 21 matching lines...) Expand all
32 #define PageConsoleAgent_h 32 #define PageConsoleAgent_h
33 33
34 #include "core/inspector/InspectorConsoleAgent.h" 34 #include "core/inspector/InspectorConsoleAgent.h"
35 #include "wtf/PassOwnPtr.h" 35 #include "wtf/PassOwnPtr.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class ConsoleMessage; 39 class ConsoleMessage;
40 class ConsoleMessageStorage; 40 class ConsoleMessageStorage;
41 class InspectorDOMAgent; 41 class InspectorDOMAgent;
42 class Page; 42 class InspectorPageAgent;
43 class WorkerInspectorProxy; 43 class WorkerInspectorProxy;
44 class WorkerGlobalScopeProxy; 44 class WorkerGlobalScopeProxy;
45 45
46 class PageConsoleAgent final : public InspectorConsoleAgent { 46 class PageConsoleAgent final : public InspectorConsoleAgent {
47 WTF_MAKE_NONCOPYABLE(PageConsoleAgent); 47 WTF_MAKE_NONCOPYABLE(PageConsoleAgent);
48 public: 48 public:
49 static PassOwnPtrWillBeRawPtr<PageConsoleAgent> create(InjectedScriptManager * injectedScriptManager, InspectorDOMAgent* domAgent, Page* page) 49 static PassOwnPtrWillBeRawPtr<PageConsoleAgent> create(InjectedScriptManager * injectedScriptManager, InspectorDOMAgent* domAgent, InspectorPageAgent* pageAg ent)
50 { 50 {
51 return adoptPtrWillBeNoop(new PageConsoleAgent(injectedScriptManager, do mAgent, page)); 51 return adoptPtrWillBeNoop(new PageConsoleAgent(injectedScriptManager, do mAgent, pageAgent));
52 } 52 }
53 virtual ~PageConsoleAgent(); 53 virtual ~PageConsoleAgent();
54 virtual void trace(Visitor*) override; 54 virtual void trace(Visitor*) override;
55 55
56 virtual void enable(ErrorString*) override; 56 virtual void enable(ErrorString*) override;
57 virtual void disable(ErrorString*) override; 57 virtual void disable(ErrorString*) override;
58 58
59 virtual bool isWorkerAgent() override { return false; } 59 virtual bool isWorkerAgent() override { return false; }
60 60
61 void workerTerminated(WorkerInspectorProxy*); 61 void workerTerminated(WorkerInspectorProxy*);
62 62
63 void workerConsoleAgentEnabled(WorkerGlobalScopeProxy*); 63 void workerConsoleAgentEnabled(WorkerGlobalScopeProxy*);
64 64
65 protected: 65 protected:
66 virtual ConsoleMessageStorage* messageStorage() override; 66 virtual ConsoleMessageStorage* messageStorage() override;
67 67
68 virtual void enableStackCapturingIfNeeded() override; 68 virtual void enableStackCapturingIfNeeded() override;
69 virtual void disableStackCapturingIfNeeded() override; 69 virtual void disableStackCapturingIfNeeded() override;
70 70
71 private: 71 private:
72 PageConsoleAgent(InjectedScriptManager*, InspectorDOMAgent*, Page*); 72 PageConsoleAgent(InjectedScriptManager*, InspectorDOMAgent*, InspectorPageAg ent*);
73 virtual void clearMessages(ErrorString*) override; 73 virtual void clearMessages(ErrorString*) override;
74 virtual void addInspectedNode(ErrorString*, int nodeId) override; 74 virtual void addInspectedNode(ErrorString*, int nodeId) override;
75 75
76 RawPtrWillBeMember<InspectorDOMAgent> m_inspectorDOMAgent; 76 RawPtrWillBeMember<InspectorDOMAgent> m_inspectorDOMAgent;
77 RawPtrWillBeMember<Page> m_page; 77 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent;
78 HashSet<WorkerGlobalScopeProxy*> m_workersWithEnabledConsole; 78 HashSet<WorkerGlobalScopeProxy*> m_workersWithEnabledConsole;
79 79
80 static int s_enabledAgentCount; 80 static int s_enabledAgentCount;
81 }; 81 };
82 82
83 } // namespace blink 83 } // namespace blink
84 84
85 85
86 #endif // !defined(PageConsoleAgent_h) 86 #endif // !defined(PageConsoleAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTracingAgent.cpp ('k') | Source/core/inspector/PageConsoleAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698