OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 29 matching lines...) Expand all Loading... |
40 #include <wtf/Noncopyable.h> | 40 #include <wtf/Noncopyable.h> |
41 #include <wtf/PassRefPtr.h> | 41 #include <wtf/PassRefPtr.h> |
42 #include <wtf/RefPtr.h> | 42 #include <wtf/RefPtr.h> |
43 | 43 |
44 namespace WebCore { | 44 namespace WebCore { |
45 | 45 |
46 class InjectedScriptModule; | 46 class InjectedScriptModule; |
47 class Node; | 47 class Node; |
48 class SerializedScriptValue; | 48 class SerializedScriptValue; |
49 | 49 |
50 #if ENABLE(INSPECTOR) | |
51 | 50 |
52 class InjectedScript : public InjectedScriptBase { | 51 class InjectedScript : public InjectedScriptBase { |
53 public: | 52 public: |
54 InjectedScript(); | 53 InjectedScript(); |
55 ~InjectedScript() { } | 54 ~InjectedScript() { } |
56 | 55 |
57 void evaluate(ErrorString*, | 56 void evaluate(ErrorString*, |
58 const String& expression, | 57 const String& expression, |
59 const String& objectGroup, | 58 const String& objectGroup, |
60 bool includeCommandLineAPI, | 59 bool includeCommandLineAPI, |
(...skipping 20 matching lines...) Expand all Loading... |
81 RefPtr<TypeBuilder::Runtime::RemoteObject>* result, | 80 RefPtr<TypeBuilder::Runtime::RemoteObject>* result, |
82 TypeBuilder::OptOutput<bool>* wasThrown); | 81 TypeBuilder::OptOutput<bool>* wasThrown); |
83 void restartFrame(ErrorString*, const ScriptValue& callFrames, const String&
callFrameId, RefPtr<InspectorObject>* result); | 82 void restartFrame(ErrorString*, const ScriptValue& callFrames, const String&
callFrameId, RefPtr<InspectorObject>* result); |
84 void setVariableValue(ErrorString*, const ScriptValue& callFrames, const Str
ing* callFrameIdOpt, const String* functionObjectIdOpt, int scopeNumber, const S
tring& variableName, const String& newValueStr); | 83 void setVariableValue(ErrorString*, const ScriptValue& callFrames, const Str
ing* callFrameIdOpt, const String* functionObjectIdOpt, int scopeNumber, const S
tring& variableName, const String& newValueStr); |
85 void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeB
uilder::Debugger::FunctionDetails>* result); | 84 void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeB
uilder::Debugger::FunctionDetails>* result); |
86 void getProperties(ErrorString*, const String& objectId, bool ownProperties,
RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::PropertyDescriptor> >* result); | 85 void getProperties(ErrorString*, const String& objectId, bool ownProperties,
RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::PropertyDescriptor> >* result); |
87 void getInternalProperties(ErrorString*, const String& objectId, RefPtr<Type
Builder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor> >* result); | 86 void getInternalProperties(ErrorString*, const String& objectId, RefPtr<Type
Builder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor> >* result); |
88 Node* nodeForObjectId(const String& objectId); | 87 Node* nodeForObjectId(const String& objectId); |
89 void releaseObject(const String& objectId); | 88 void releaseObject(const String& objectId); |
90 | 89 |
91 #if ENABLE(JAVASCRIPT_DEBUGGER) | |
92 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > wrapCallFr
ames(const ScriptValue&); | 90 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > wrapCallFr
ames(const ScriptValue&); |
93 #endif | |
94 | 91 |
95 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapObject(const ScriptValue&
, const String& groupName, bool generatePreview = false) const; | 92 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapObject(const ScriptValue&
, const String& groupName, bool generatePreview = false) const; |
96 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapTable(const ScriptValue&
table, const ScriptValue& columns) const; | 93 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapTable(const ScriptValue&
table, const ScriptValue& columns) const; |
97 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapNode(Node*, const String&
groupName); | 94 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapNode(Node*, const String&
groupName); |
98 ScriptValue findObjectById(const String& objectId) const; | 95 ScriptValue findObjectById(const String& objectId) const; |
99 | 96 |
100 void inspectNode(Node*); | 97 void inspectNode(Node*); |
101 void releaseObjectGroup(const String&); | 98 void releaseObjectGroup(const String&); |
102 | 99 |
103 private: | 100 private: |
104 friend class InjectedScriptModule; | 101 friend class InjectedScriptModule; |
105 friend InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState*)
; | 102 friend InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState*)
; |
106 InjectedScript(ScriptObject, InspectedStateAccessCheck); | 103 InjectedScript(ScriptObject, InspectedStateAccessCheck); |
107 | 104 |
108 ScriptValue nodeAsScriptValue(Node*); | 105 ScriptValue nodeAsScriptValue(Node*); |
109 }; | 106 }; |
110 | 107 |
111 #endif | |
112 | 108 |
113 } // namespace WebCore | 109 } // namespace WebCore |
114 | 110 |
115 #endif | 111 #endif |
OLD | NEW |