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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class InspectorFrontend; | 44 class InspectorFrontend; |
45 class InstrumentingAgents; | 45 class InstrumentingAgents; |
46 class JSONObject; | 46 class JSONObject; |
47 class Page; | 47 class Page; |
48 | 48 |
49 typedef String ErrorString; | 49 typedef String ErrorString; |
50 | 50 |
51 class InspectorInspectorAgent FINAL : public InspectorBaseAgent<InspectorInspect
orAgent>, public InspectorBackendDispatcher::InspectorCommandHandler { | 51 class InspectorInspectorAgent FINAL : public InspectorBaseAgent<InspectorInspect
orAgent>, public InspectorBackendDispatcher::InspectorCommandHandler { |
52 WTF_MAKE_NONCOPYABLE(InspectorInspectorAgent); | 52 WTF_MAKE_NONCOPYABLE(InspectorInspectorAgent); |
53 public: | 53 public: |
54 static PassOwnPtr<InspectorInspectorAgent> create(Page* page, InjectedScript
Manager* injectedScriptManager) | 54 static PassOwnPtrWillBeRawPtr<InspectorInspectorAgent> create(Page* page, In
jectedScriptManager* injectedScriptManager) |
55 { | 55 { |
56 return adoptPtr(new InspectorInspectorAgent(page, injectedScriptManager)
); | 56 return adoptPtrWillBeNoop(new InspectorInspectorAgent(page, injectedScri
ptManager)); |
57 } | 57 } |
58 | 58 |
59 virtual ~InspectorInspectorAgent(); | 59 virtual ~InspectorInspectorAgent(); |
| 60 virtual void trace(Visitor*) OVERRIDE; |
60 | 61 |
61 // Inspector front-end API. | 62 // Inspector front-end API. |
62 virtual void enable(ErrorString*) OVERRIDE; | 63 virtual void enable(ErrorString*) OVERRIDE; |
63 virtual void disable(ErrorString*) OVERRIDE; | 64 virtual void disable(ErrorString*) OVERRIDE; |
64 virtual void reset(ErrorString*) OVERRIDE; | 65 virtual void reset(ErrorString*) OVERRIDE; |
65 | 66 |
66 virtual void init() OVERRIDE; | 67 virtual void init() OVERRIDE; |
67 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 68 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
68 virtual void clearFrontend() OVERRIDE; | 69 virtual void clearFrontend() OVERRIDE; |
69 | 70 |
70 void didClearDocumentOfWindowObject(LocalFrame*); | 71 void didClearDocumentOfWindowObject(LocalFrame*); |
71 | 72 |
72 void domContentLoadedEventFired(LocalFrame*); | 73 void domContentLoadedEventFired(LocalFrame*); |
73 | 74 |
74 bool hasFrontend() const { return m_frontend; } | 75 bool hasFrontend() const { return m_frontend; } |
75 | 76 |
76 // Generic code called from custom implementations. | 77 // Generic code called from custom implementations. |
77 void evaluateForTestInFrontend(long testCallId, const String& script); | 78 void evaluateForTestInFrontend(long testCallId, const String& script); |
78 | 79 |
79 void setInjectedScriptForOrigin(const String& origin, const String& source); | 80 void setInjectedScriptForOrigin(const String& origin, const String& source); |
80 | 81 |
81 void inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect,
PassRefPtr<JSONObject> hints); | 82 void inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect,
PassRefPtr<JSONObject> hints); |
82 | 83 |
83 private: | 84 private: |
84 InspectorInspectorAgent(Page*, InjectedScriptManager*); | 85 InspectorInspectorAgent(Page*, InjectedScriptManager*); |
85 | 86 |
86 Page* m_inspectedPage; | 87 RawPtrWillBeMember<Page> m_inspectedPage; |
87 InspectorFrontend* m_frontend; | 88 InspectorFrontend* m_frontend; |
| 89 // FIXME: Oilpan: Move InjectedScriptManager to heap in follow-up CL. |
88 InjectedScriptManager* m_injectedScriptManager; | 90 InjectedScriptManager* m_injectedScriptManager; |
89 | 91 |
90 Vector<pair<long, String> > m_pendingEvaluateTestCommands; | 92 Vector<pair<long, String> > m_pendingEvaluateTestCommands; |
91 pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<JSONObject> > m_pend
ingInspectData; | 93 pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<JSONObject> > m_pend
ingInspectData; |
92 typedef HashMap<String, String> InjectedScriptForOriginMap; | 94 typedef HashMap<String, String> InjectedScriptForOriginMap; |
93 InjectedScriptForOriginMap m_injectedScriptForOrigin; | 95 InjectedScriptForOriginMap m_injectedScriptForOrigin; |
94 }; | 96 }; |
95 | 97 |
96 } // namespace WebCore | 98 } // namespace WebCore |
97 | 99 |
98 #endif // !defined(InspectorInspectorAgent_h) | 100 #endif // !defined(InspectorInspectorAgent_h) |
OLD | NEW |