| 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 21 matching lines...) Expand all Loading... |
| 32 #define PageRuntimeAgent_h | 32 #define PageRuntimeAgent_h |
| 33 | 33 |
| 34 #include "bindings/core/v8/ScriptState.h" | 34 #include "bindings/core/v8/ScriptState.h" |
| 35 #include "core/inspector/InspectorRuntimeAgent.h" | 35 #include "core/inspector/InspectorRuntimeAgent.h" |
| 36 #include "wtf/PassOwnPtr.h" | 36 #include "wtf/PassOwnPtr.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class InspectorClient; | 40 class InspectorClient; |
| 41 class InspectorPageAgent; | 41 class InspectorPageAgent; |
| 42 class Page; | |
| 43 class SecurityOrigin; | 42 class SecurityOrigin; |
| 44 | 43 |
| 45 class PageRuntimeAgent final : public InspectorRuntimeAgent { | 44 class PageRuntimeAgent final : public InspectorRuntimeAgent { |
| 46 public: | 45 public: |
| 47 static PassOwnPtrWillBeRawPtr<PageRuntimeAgent> create(InjectedScriptManager
* injectedScriptManager, InspectorClient* client, ScriptDebugServer* scriptDebug
Server, Page* page, InspectorPageAgent* pageAgent) | 46 static PassOwnPtrWillBeRawPtr<PageRuntimeAgent> create(InjectedScriptManager
* injectedScriptManager, InspectorClient* client, ScriptDebugServer* scriptDebug
Server, InspectorPageAgent* pageAgent) |
| 48 { | 47 { |
| 49 return adoptPtrWillBeNoop(new PageRuntimeAgent(injectedScriptManager, cl
ient, scriptDebugServer, page, pageAgent)); | 48 return adoptPtrWillBeNoop(new PageRuntimeAgent(injectedScriptManager, cl
ient, scriptDebugServer, pageAgent)); |
| 50 } | 49 } |
| 51 virtual ~PageRuntimeAgent(); | 50 virtual ~PageRuntimeAgent(); |
| 52 virtual void trace(Visitor*) override; | 51 virtual void trace(Visitor*) override; |
| 53 virtual void init() override; | 52 virtual void init() override; |
| 54 virtual void enable(ErrorString*) override; | 53 virtual void enable(ErrorString*) override; |
| 55 virtual void run(ErrorString*) override; | 54 virtual void run(ErrorString*) override; |
| 56 | 55 |
| 57 void didClearDocumentOfWindowObject(LocalFrame*); | 56 void didClearDocumentOfWindowObject(LocalFrame*); |
| 58 void didCreateScriptContext(LocalFrame*, ScriptState*, SecurityOrigin*, int
worldId); | 57 void didCreateScriptContext(LocalFrame*, ScriptState*, SecurityOrigin*, int
worldId); |
| 59 void willReleaseScriptContext(LocalFrame*, ScriptState*); | 58 void willReleaseScriptContext(LocalFrame*, ScriptState*); |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 PageRuntimeAgent(InjectedScriptManager*, InspectorClient*, ScriptDebugServer
*, Page*, InspectorPageAgent*); | 61 PageRuntimeAgent(InjectedScriptManager*, InspectorClient*, ScriptDebugServer
*, InspectorPageAgent*); |
| 63 | 62 |
| 64 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) override; | 63 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) override; |
| 65 virtual void muteConsole() override; | 64 virtual void muteConsole() override; |
| 66 virtual void unmuteConsole() override; | 65 virtual void unmuteConsole() override; |
| 67 void reportExecutionContextCreation(); | 66 void reportExecutionContextCreation(); |
| 68 | 67 |
| 69 InspectorClient* m_client; | 68 InspectorClient* m_client; |
| 70 RawPtrWillBeMember<Page> m_inspectedPage; | |
| 71 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; | 69 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| 72 bool m_mainWorldContextCreated; | 70 bool m_mainWorldContextCreated; |
| 73 int m_debuggerId; | 71 int m_debuggerId; |
| 74 }; | 72 }; |
| 75 | 73 |
| 76 } // namespace blink | 74 } // namespace blink |
| 77 | 75 |
| 78 | 76 |
| 79 #endif // !defined(InspectorPagerAgent_h) | 77 #endif // !defined(InspectorPagerAgent_h) |
| OLD | NEW |