| 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 30 matching lines...) Expand all Loading... |
| 41 class DocumentLoader; | 41 class DocumentLoader; |
| 42 class Frame; | 42 class Frame; |
| 43 class InjectedScriptManager; | 43 class InjectedScriptManager; |
| 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 InspectorAgent : public InspectorBaseAgent<InspectorAgent>, public Inspect
orBackendDispatcher::InspectorCommandHandler { | 51 class InspectorAgent FINAL : public InspectorBaseAgent<InspectorAgent>, public I
nspectorBackendDispatcher::InspectorCommandHandler { |
| 52 WTF_MAKE_NONCOPYABLE(InspectorAgent); | 52 WTF_MAKE_NONCOPYABLE(InspectorAgent); |
| 53 public: | 53 public: |
| 54 static PassOwnPtr<InspectorAgent> create(Page* page, InjectedScriptManager*
injectedScriptManager, InstrumentingAgents* instrumentingAgents, InspectorCompos
iteState* state) | 54 static PassOwnPtr<InspectorAgent> create(Page* page, InjectedScriptManager*
injectedScriptManager, InstrumentingAgents* instrumentingAgents, InspectorCompos
iteState* state) |
| 55 { | 55 { |
| 56 return adoptPtr(new InspectorAgent(page, injectedScriptManager, instrume
ntingAgents, state)); | 56 return adoptPtr(new InspectorAgent(page, injectedScriptManager, instrume
ntingAgents, state)); |
| 57 } | 57 } |
| 58 | 58 |
| 59 virtual ~InspectorAgent(); | 59 virtual ~InspectorAgent(); |
| 60 | 60 |
| 61 // Inspector front-end API. | 61 // Inspector front-end API. |
| 62 void enable(ErrorString*); | 62 void enable(ErrorString*); |
| 63 void disable(ErrorString*); | 63 void disable(ErrorString*); |
| 64 void reset(ErrorString*); | 64 void reset(ErrorString*); |
| 65 | 65 |
| 66 virtual void setFrontend(InspectorFrontend*); | 66 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
| 67 virtual void clearFrontend(); | 67 virtual void clearFrontend() OVERRIDE; |
| 68 | 68 |
| 69 void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*); | 69 void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*); |
| 70 | 70 |
| 71 void didCommitLoad(Frame*, DocumentLoader*); | 71 void didCommitLoad(Frame*, DocumentLoader*); |
| 72 void domContentLoadedEventFired(Frame*); | 72 void domContentLoadedEventFired(Frame*); |
| 73 | 73 |
| 74 bool hasFrontend() const { return m_frontend; } | 74 bool hasFrontend() const { return m_frontend; } |
| 75 | 75 |
| 76 // Generic code called from custom implementations. | 76 // Generic code called from custom implementations. |
| 77 void evaluateForTestInFrontend(long testCallId, const String& script); | 77 void evaluateForTestInFrontend(long testCallId, const String& script); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 89 | 89 |
| 90 Vector<pair<long, String> > m_pendingEvaluateTestCommands; | 90 Vector<pair<long, String> > m_pendingEvaluateTestCommands; |
| 91 pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<JSONObject> > m_pend
ingInspectData; | 91 pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<JSONObject> > m_pend
ingInspectData; |
| 92 typedef HashMap<String, String> InjectedScriptForOriginMap; | 92 typedef HashMap<String, String> InjectedScriptForOriginMap; |
| 93 InjectedScriptForOriginMap m_injectedScriptForOrigin; | 93 InjectedScriptForOriginMap m_injectedScriptForOrigin; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace WebCore | 96 } // namespace WebCore |
| 97 | 97 |
| 98 #endif // !defined(InspectorAgent_h) | 98 #endif // !defined(InspectorAgent_h) |
| OLD | NEW |