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