OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class ConsoleMessageStorage; | 39 class ConsoleMessageStorage; |
40 class InspectorDOMAgent; | 40 class InspectorDOMAgent; |
41 class Page; | 41 class Page; |
42 | 42 |
43 class PageConsoleAgent final : public InspectorConsoleAgent { | 43 class PageConsoleAgent final : public InspectorConsoleAgent { |
44 WTF_MAKE_NONCOPYABLE(PageConsoleAgent); | 44 WTF_MAKE_NONCOPYABLE(PageConsoleAgent); |
45 public: | 45 public: |
46 static PassOwnPtrWillBeRawPtr<PageConsoleAgent> create(InjectedScriptManager
* injectedScriptManager, InspectorDOMAgent* domAgent, InspectorTimelineAgent* ti
melineAgent, Page* page) | 46 static PassOwnPtrWillBeRawPtr<PageConsoleAgent> create(InjectedScriptManager
* injectedScriptManager, InspectorDOMAgent* domAgent, Page* page) |
47 { | 47 { |
48 return adoptPtrWillBeNoop(new PageConsoleAgent(injectedScriptManager, do
mAgent, timelineAgent, page)); | 48 return adoptPtrWillBeNoop(new PageConsoleAgent(injectedScriptManager, do
mAgent, page)); |
49 } | 49 } |
50 virtual ~PageConsoleAgent(); | 50 virtual ~PageConsoleAgent(); |
51 virtual void trace(Visitor*) override; | 51 virtual void trace(Visitor*) override; |
52 | 52 |
53 virtual bool isWorkerAgent() override { return false; } | 53 virtual bool isWorkerAgent() override { return false; } |
54 | 54 |
55 protected: | 55 protected: |
56 virtual ConsoleMessageStorage* messageStorage() override; | 56 virtual ConsoleMessageStorage* messageStorage() override; |
57 | 57 |
58 virtual void enableStackCapturingIfNeeded() override; | 58 virtual void enableStackCapturingIfNeeded() override; |
59 virtual void disableStackCapturingIfNeeded() override; | 59 virtual void disableStackCapturingIfNeeded() override; |
60 | 60 |
61 private: | 61 private: |
62 PageConsoleAgent(InjectedScriptManager*, InspectorDOMAgent*, InspectorTimeli
neAgent*, Page*); | 62 PageConsoleAgent(InjectedScriptManager*, InspectorDOMAgent*, Page*); |
63 virtual void clearMessages(ErrorString*) override; | 63 virtual void clearMessages(ErrorString*) override; |
64 virtual void addInspectedNode(ErrorString*, int nodeId) override; | 64 virtual void addInspectedNode(ErrorString*, int nodeId) override; |
65 | 65 |
66 RawPtrWillBeMember<InspectorDOMAgent> m_inspectorDOMAgent; | 66 RawPtrWillBeMember<InspectorDOMAgent> m_inspectorDOMAgent; |
67 RawPtrWillBeMember<Page> m_page; | 67 RawPtrWillBeMember<Page> m_page; |
68 | 68 |
69 static int s_enabledAgentCount; | 69 static int s_enabledAgentCount; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace blink | 72 } // namespace blink |
73 | 73 |
74 | 74 |
75 #endif // !defined(PageConsoleAgent_h) | 75 #endif // !defined(PageConsoleAgent_h) |
OLD | NEW |