OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 14 matching lines...) Expand all Loading... |
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #ifndef InspectorInspectorAgent_h | 30 #ifndef InspectorInspectorAgent_h |
31 #define InspectorInspectorAgent_h | 31 #define InspectorInspectorAgent_h |
32 | 32 |
33 #include "core/InspectorFrontend.h" | 33 #include "core/InspectorFrontend.h" |
34 #include "core/inspector/InspectorBaseAgent.h" | 34 #include "core/inspector/InspectorBaseAgent.h" |
35 #include "wtf/HashMap.h" | |
36 #include "wtf/PassOwnPtr.h" | 35 #include "wtf/PassOwnPtr.h" |
37 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
38 | 37 |
39 namespace blink { | 38 namespace blink { |
40 | 39 |
41 class LocalFrame; | 40 class LocalFrame; |
42 class InjectedScriptManager; | 41 class InjectedScriptManager; |
43 class InspectorController; | 42 class InspectorController; |
44 class JSONObject; | 43 class JSONObject; |
45 | 44 |
(...skipping 12 matching lines...) Expand all Loading... |
58 | 57 |
59 // Inspector front-end API. | 58 // Inspector front-end API. |
60 virtual void enable(ErrorString*) override; | 59 virtual void enable(ErrorString*) override; |
61 virtual void disable(ErrorString*) override; | 60 virtual void disable(ErrorString*) override; |
62 virtual void reset(ErrorString*) override; | 61 virtual void reset(ErrorString*) override; |
63 | 62 |
64 virtual void init() override; | 63 virtual void init() override; |
65 virtual void setFrontend(InspectorFrontend*) override; | 64 virtual void setFrontend(InspectorFrontend*) override; |
66 virtual void clearFrontend() override; | 65 virtual void clearFrontend() override; |
67 | 66 |
68 void didClearDocumentOfWindowObject(LocalFrame*); | |
69 | |
70 void domContentLoadedEventFired(LocalFrame*); | 67 void domContentLoadedEventFired(LocalFrame*); |
71 | 68 |
72 bool hasFrontend() const { return m_frontend; } | 69 bool hasFrontend() const { return m_frontend; } |
73 | 70 |
74 // Generic code called from custom implementations. | 71 // Generic code called from custom implementations. |
75 void evaluateForTestInFrontend(long testCallId, const String& script); | 72 void evaluateForTestInFrontend(long testCallId, const String& script); |
76 | 73 |
77 void setInjectedScriptForOrigin(const String& origin, const String& source); | |
78 | |
79 void inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect,
PassRefPtr<JSONObject> hints); | 74 void inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect,
PassRefPtr<JSONObject> hints); |
80 | 75 |
81 private: | 76 private: |
82 InspectorInspectorAgent(InspectorController*, InjectedScriptManager*); | 77 InspectorInspectorAgent(InspectorController*, InjectedScriptManager*); |
83 | 78 |
84 RawPtrWillBeMember<InspectorController> m_inspectorController; | 79 RawPtrWillBeMember<InspectorController> m_inspectorController; |
85 InspectorFrontend::Inspector* m_frontend; | 80 InspectorFrontend::Inspector* m_frontend; |
86 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 81 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
87 | 82 |
88 Vector<pair<long, String> > m_pendingEvaluateTestCommands; | 83 Vector<pair<long, String> > m_pendingEvaluateTestCommands; |
89 pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<JSONObject> > m_pend
ingInspectData; | 84 pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<JSONObject> > m_pend
ingInspectData; |
90 typedef HashMap<String, String> InjectedScriptForOriginMap; | |
91 InjectedScriptForOriginMap m_injectedScriptForOrigin; | |
92 }; | 85 }; |
93 | 86 |
94 } // namespace blink | 87 } // namespace blink |
95 | 88 |
96 #endif // !defined(InspectorInspectorAgent_h) | 89 #endif // !defined(InspectorInspectorAgent_h) |
OLD | NEW |