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 26 matching lines...) Expand all Loading... |
37 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 class InjectedScript; | 41 class InjectedScript; |
42 class InjectedScriptManager; | 42 class InjectedScriptManager; |
43 class InstrumentingAgents; | 43 class InstrumentingAgents; |
44 class JSONArray; | 44 class JSONArray; |
45 class ScriptState; | 45 class ScriptState; |
46 class ScriptDebugServer; | 46 class ScriptDebugServer; |
| 47 class ScriptDebugServerBase; |
47 | 48 |
48 typedef String ErrorString; | 49 typedef String ErrorString; |
49 | 50 |
50 class InspectorRuntimeAgent : public InspectorBaseAgent<InspectorRuntimeAgent>,
public InspectorBackendDispatcher::RuntimeCommandHandler { | 51 class InspectorRuntimeAgent : public InspectorBaseAgent<InspectorRuntimeAgent>,
public InspectorBackendDispatcher::RuntimeCommandHandler { |
51 WTF_MAKE_NONCOPYABLE(InspectorRuntimeAgent); | 52 WTF_MAKE_NONCOPYABLE(InspectorRuntimeAgent); |
52 public: | 53 public: |
53 virtual ~InspectorRuntimeAgent(); | 54 virtual ~InspectorRuntimeAgent(); |
54 | 55 |
55 // Part of the protocol. | 56 // Part of the protocol. |
56 virtual void enable(ErrorString*) OVERRIDE; | 57 virtual void enable(ErrorString*) OVERRIDE; |
(...skipping 11 matching lines...) Expand all Loading... |
68 virtual void callFunctionOn(ErrorString*, | 69 virtual void callFunctionOn(ErrorString*, |
69 const String& objectId, | 70 const String& objectId, |
70 const String& expression, | 71 const String& expression, |
71 const RefPtr<JSONArray>* optionalArguments, | 72 const RefPtr<JSONArray>* optionalArguments, |
72 const bool* doNotPauseOnExceptionsAndMuteConsole, | 73 const bool* doNotPauseOnExceptionsAndMuteConsole, |
73 const bool* returnByValue, | 74 const bool* returnByValue, |
74 const bool* generatePreview, | 75 const bool* generatePreview, |
75 RefPtr<TypeBuilder::Runtime::RemoteObject>& result, | 76 RefPtr<TypeBuilder::Runtime::RemoteObject>& result, |
76 TypeBuilder::OptOutput<bool>* wasThrown) OVERRIDE FINAL; | 77 TypeBuilder::OptOutput<bool>* wasThrown) OVERRIDE FINAL; |
77 virtual void releaseObject(ErrorString*, const String& objectId) OVERRIDE FI
NAL; | 78 virtual void releaseObject(ErrorString*, const String& objectId) OVERRIDE FI
NAL; |
| 79 virtual void getCompletions(ErrorString*, |
| 80 const String& expression, |
| 81 const int* executionContextId, |
| 82 RefPtr<TypeBuilder::Array<String> >& result) OVERRIDE FINAL; |
| 83 |
78 virtual void getProperties(ErrorString*, const String& objectId, const bool*
ownProperties, const bool* accessorPropertiesOnly, RefPtr<TypeBuilder::Array<Ty
peBuilder::Runtime::PropertyDescriptor> >& result, RefPtr<TypeBuilder::Array<Typ
eBuilder::Runtime::InternalPropertyDescriptor> >& internalProperties) OVERRIDE F
INAL; | 84 virtual void getProperties(ErrorString*, const String& objectId, const bool*
ownProperties, const bool* accessorPropertiesOnly, RefPtr<TypeBuilder::Array<Ty
peBuilder::Runtime::PropertyDescriptor> >& result, RefPtr<TypeBuilder::Array<Typ
eBuilder::Runtime::InternalPropertyDescriptor> >& internalProperties) OVERRIDE F
INAL; |
| 85 virtual void getProperty(ErrorString*, const String& objectId, const RefPtr<
JSONArray>& propertyPath, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, Ty
peBuilder::OptOutput<bool>* wasThrown); |
79 virtual void releaseObjectGroup(ErrorString*, const String& objectGroup) OVE
RRIDE FINAL; | 86 virtual void releaseObjectGroup(ErrorString*, const String& objectGroup) OVE
RRIDE FINAL; |
80 virtual void run(ErrorString*) OVERRIDE; | 87 virtual void run(ErrorString*) OVERRIDE; |
81 | 88 |
82 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; | 89 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; |
83 virtual void clearFrontend() OVERRIDE FINAL; | 90 virtual void clearFrontend() OVERRIDE FINAL; |
84 virtual void restore() OVERRIDE FINAL; | 91 virtual void restore() OVERRIDE FINAL; |
85 | 92 |
86 protected: | 93 protected: |
87 InspectorRuntimeAgent(InjectedScriptManager*, ScriptDebugServer*); | 94 InspectorRuntimeAgent(InjectedScriptManager*, ScriptDebugServerBase*); |
88 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; | 95 virtual InjectedScript& injectedScriptForEval(ErrorString*, const int* execu
tionContextId) = 0; |
89 | 96 |
90 virtual void muteConsole() = 0; | 97 virtual void muteConsole() = 0; |
91 virtual void unmuteConsole() = 0; | 98 virtual void unmuteConsole() = 0; |
92 | 99 |
93 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } | 100 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } |
94 void addExecutionContextToFrontend(ScriptState*, bool isPageContext, const S
tring& name, const String& frameId); | 101 void addExecutionContextToFrontend(ScriptState*, bool isPageContext, const S
tring& name, const String& frameId); |
95 | 102 |
96 bool m_enabled; | 103 bool m_enabled; |
97 InspectorFrontend::Runtime* m_frontend; | 104 InspectorFrontend::Runtime* m_frontend; |
98 | 105 |
99 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; | 106 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; |
100 ScriptStateToId m_scriptStateToId; | 107 ScriptStateToId m_scriptStateToId; |
101 | 108 |
102 private: | 109 private: |
103 InjectedScriptManager* m_injectedScriptManager; | 110 InjectedScriptManager* m_injectedScriptManager; |
104 ScriptDebugServer* m_scriptDebugServer; | 111 ScriptDebugServerBase* m_scriptDebugServer; |
105 }; | 112 }; |
106 | 113 |
107 } // namespace WebCore | 114 } // namespace WebCore |
108 | 115 |
109 #endif // InspectorRuntimeAgent_h | 116 #endif // InspectorRuntimeAgent_h |
OLD | NEW |