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