| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #if ENABLE(INSPECTOR) | 34 #if ENABLE(INSPECTOR) |
| 35 | 35 |
| 36 #include "InspectorFrontend.h" | 36 #include "InspectorFrontend.h" |
| 37 #include "InspectorRuntimeAgent.h" | 37 #include "InspectorRuntimeAgent.h" |
| 38 #include "ScriptState.h" | 38 #include "ScriptState.h" |
| 39 #include <wtf/PassOwnPtr.h> | 39 #include <wtf/PassOwnPtr.h> |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 class InspectorAgent; | |
| 44 class InspectorPageAgent; | 43 class InspectorPageAgent; |
| 45 class Page; | 44 class Page; |
| 46 class SecurityOrigin; | 45 class SecurityOrigin; |
| 47 | 46 |
| 48 class PageRuntimeAgent : public InspectorRuntimeAgent { | 47 class PageRuntimeAgent : public InspectorRuntimeAgent { |
| 49 public: | 48 public: |
| 50 static PassOwnPtr<PageRuntimeAgent> create(InstrumentingAgents* instrumentin
gAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager, Pa
ge* page, InspectorPageAgent* pageAgent, InspectorAgent* inspectorAgent) | 49 static PassOwnPtr<PageRuntimeAgent> create(InstrumentingAgents* instrumentin
gAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager, Pa
ge* page, InspectorPageAgent* pageAgent) |
| 51 { | 50 { |
| 52 return adoptPtr(new PageRuntimeAgent(instrumentingAgents, state, injecte
dScriptManager, page, pageAgent, inspectorAgent)); | 51 return adoptPtr(new PageRuntimeAgent(instrumentingAgents, state, injecte
dScriptManager, page, pageAgent)); |
| 53 } | 52 } |
| 54 virtual ~PageRuntimeAgent(); | 53 virtual ~PageRuntimeAgent(); |
| 55 virtual void setFrontend(InspectorFrontend*); | 54 virtual void setFrontend(InspectorFrontend*); |
| 56 virtual void clearFrontend(); | 55 virtual void clearFrontend(); |
| 57 virtual void restore(); | 56 virtual void restore(); |
| 58 virtual void enable(ErrorString*); | 57 virtual void enable(ErrorString*); |
| 59 virtual void disable(ErrorString*); | 58 virtual void disable(ErrorString*); |
| 60 | 59 |
| 61 void didClearWindowObject(Frame*); | 60 void didCreateMainWorldContext(Frame*); |
| 62 void didCreateIsolatedContext(Frame*, ScriptState*, SecurityOrigin*); | 61 void didCreateIsolatedContext(Frame*, ScriptState*, SecurityOrigin*); |
| 63 | 62 |
| 64 private: | 63 private: |
| 65 PageRuntimeAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManage
r*, Page*, InspectorPageAgent*, InspectorAgent*); | 64 PageRuntimeAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManage
r*, Page*, InspectorPageAgent*); |
| 66 | 65 |
| 67 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId); | 66 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId); |
| 68 virtual void muteConsole(); | 67 virtual void muteConsole(); |
| 69 virtual void unmuteConsole(); | 68 virtual void unmuteConsole(); |
| 70 void reportExecutionContextCreation(); | 69 void reportExecutionContextCreation(); |
| 71 void notifyContextCreated(const String& frameId, ScriptState*, SecurityOrigi
n*, bool isPageContext); | 70 void notifyContextCreated(const String& frameId, ScriptState*, SecurityOrigi
n*, bool isPageContext); |
| 72 | 71 |
| 73 Page* m_inspectedPage; | 72 Page* m_inspectedPage; |
| 74 InspectorPageAgent* m_pageAgent; | 73 InspectorPageAgent* m_pageAgent; |
| 75 InspectorAgent* m_inspectorAgent; | |
| 76 InspectorFrontend::Runtime* m_frontend; | 74 InspectorFrontend::Runtime* m_frontend; |
| 75 bool m_mainWorldContextCreated; |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 } // namespace WebCore | 78 } // namespace WebCore |
| 80 | 79 |
| 81 #endif // ENABLE(INSPECTOR) | 80 #endif // ENABLE(INSPECTOR) |
| 82 | 81 |
| 83 #endif // !defined(InspectorPagerAgent_h) | 82 #endif // !defined(InspectorPagerAgent_h) |
| OLD | NEW |