| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef PageRuntimeAgent_h | 31 #ifndef PageRuntimeAgent_h |
| 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 LocalFrame; | 40 class InspectorPageAgent; |
| 41 class SecurityOrigin; | 41 class SecurityOrigin; |
| 42 | 42 |
| 43 class PageRuntimeAgent final : public InspectorRuntimeAgent { | 43 class PageRuntimeAgent final : public InspectorRuntimeAgent { |
| 44 public: | 44 public: |
| 45 static PassOwnPtrWillBeRawPtr<PageRuntimeAgent> create(LocalFrame* inspected
Frame, InjectedScriptManager* injectedScriptManager, InspectorRuntimeAgent::Clie
nt* client, ScriptDebugServer* scriptDebugServer) | 45 static PassOwnPtrWillBeRawPtr<PageRuntimeAgent> create(InjectedScriptManager
* injectedScriptManager, InspectorRuntimeAgent::Client* client, ScriptDebugServe
r* scriptDebugServer, InspectorPageAgent* pageAgent) |
| 46 { | 46 { |
| 47 return adoptPtrWillBeNoop(new PageRuntimeAgent(inspectedFrame, injectedS
criptManager, client, scriptDebugServer)); | 47 return adoptPtrWillBeNoop(new PageRuntimeAgent(injectedScriptManager, cl
ient, scriptDebugServer, pageAgent)); |
| 48 } | 48 } |
| 49 virtual ~PageRuntimeAgent(); | 49 virtual ~PageRuntimeAgent(); |
| 50 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
| 51 virtual void init() override; | 51 virtual void init() override; |
| 52 virtual void enable(ErrorString*) override; | 52 virtual void enable(ErrorString*) override; |
| 53 | 53 |
| 54 void didClearDocumentOfWindowObject(LocalFrame*); | 54 void didClearDocumentOfWindowObject(LocalFrame*); |
| 55 void didCreateScriptContext(LocalFrame*, ScriptState*, SecurityOrigin*, int
worldId); | 55 void didCreateScriptContext(LocalFrame*, ScriptState*, SecurityOrigin*, int
worldId); |
| 56 void willReleaseScriptContext(LocalFrame*, ScriptState*); | 56 void willReleaseScriptContext(LocalFrame*, ScriptState*); |
| 57 | 57 |
| 58 int debuggerId() const { return m_debuggerId; } | 58 int debuggerId() const { return m_debuggerId; } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 PageRuntimeAgent(LocalFrame*, InjectedScriptManager*, Client*, ScriptDebugSe
rver*); | 61 PageRuntimeAgent(InjectedScriptManager*, Client*, ScriptDebugServer*, Inspec
torPageAgent*); |
| 62 | 62 |
| 63 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) override; | 63 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) override; |
| 64 virtual void muteConsole() override; | 64 virtual void muteConsole() override; |
| 65 virtual void unmuteConsole() override; | 65 virtual void unmuteConsole() override; |
| 66 void reportExecutionContextCreation(); | 66 void reportExecutionContextCreation(); |
| 67 | 67 |
| 68 RawPtrWillBeMember<LocalFrame> m_inspectedFrame; | 68 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| 69 bool m_mainWorldContextCreated; | 69 bool m_mainWorldContextCreated; |
| 70 int m_debuggerId; | 70 int m_debuggerId; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace blink | 73 } // namespace blink |
| 74 | 74 |
| 75 | 75 |
| 76 #endif // !defined(InspectorPagerAgent_h) | 76 #endif // !defined(InspectorPagerAgent_h) |
| OLD | NEW |