Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: Source/core/inspector/InjectedScript.h

Issue 136333007: DevTools: Implement evaluation on async call frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/ScriptFunctionCall.cpp ('k') | Source/core/inspector/InjectedScript.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 30
31 #ifndef InjectedScript_h 31 #ifndef InjectedScript_h
32 #define InjectedScript_h 32 #define InjectedScript_h
33 33
34 #include "InspectorTypeBuilder.h" 34 #include "InspectorTypeBuilder.h"
35 #include "bindings/v8/ScriptObject.h" 35 #include "bindings/v8/ScriptObject.h"
36 #include "core/inspector/InjectedScriptBase.h" 36 #include "core/inspector/InjectedScriptBase.h"
37 #include "core/inspector/InjectedScriptManager.h" 37 #include "core/inspector/InjectedScriptManager.h"
38 #include "core/inspector/ScriptArguments.h" 38 #include "core/inspector/ScriptArguments.h"
39 #include "wtf/Forward.h" 39 #include "wtf/Forward.h"
40 #include "wtf/Vector.h"
40 41
41 namespace WebCore { 42 namespace WebCore {
42 43
43 class InjectedScriptModule; 44 class InjectedScriptModule;
44 class Node; 45 class Node;
45 class SerializedScriptValue; 46 class SerializedScriptValue;
46 47
47
48 class InjectedScript FINAL : public InjectedScriptBase { 48 class InjectedScript FINAL : public InjectedScriptBase {
49 public: 49 public:
50 InjectedScript(); 50 InjectedScript();
51 virtual ~InjectedScript() { } 51 virtual ~InjectedScript() { }
52 52
53 void evaluate(ErrorString*, 53 void evaluate(
54 const String& expression, 54 ErrorString*,
55 const String& objectGroup, 55 const String& expression,
56 bool includeCommandLineAPI, 56 const String& objectGroup,
57 bool returnByValue, 57 bool includeCommandLineAPI,
58 bool generatePreview, 58 bool returnByValue,
59 RefPtr<TypeBuilder::Runtime::RemoteObject>* result, 59 bool generatePreview,
60 TypeBuilder::OptOutput<bool>* wasThrown); 60 RefPtr<TypeBuilder::Runtime::RemoteObject>* result,
61 void callFunctionOn(ErrorString*, 61 TypeBuilder::OptOutput<bool>* wasThrown);
62 const String& objectId, 62 void callFunctionOn(
63 const String& expression, 63 ErrorString*,
64 const String& arguments, 64 const String& objectId,
65 bool returnByValue, 65 const String& expression,
66 bool generatePreview, 66 const String& arguments,
67 RefPtr<TypeBuilder::Runtime::RemoteObject>* result, 67 bool returnByValue,
68 TypeBuilder::OptOutput<bool>* wasThrown); 68 bool generatePreview,
69 void evaluateOnCallFrame(ErrorString*, 69 RefPtr<TypeBuilder::Runtime::RemoteObject>* result,
70 const ScriptValue& callFrames, 70 TypeBuilder::OptOutput<bool>* wasThrown);
71 const String& callFrameId, 71 void evaluateOnCallFrame(
72 const String& expression, 72 ErrorString*,
73 const String& objectGroup, 73 const ScriptValue& callFrames,
74 bool includeCommandLineAPI, 74 const Vector<ScriptValue>& asyncCallStacks,
75 bool returnByValue, 75 const String& callFrameId,
76 bool generatePreview, 76 const String& expression,
77 RefPtr<TypeBuilder::Runtime::RemoteObject>* result, 77 const String& objectGroup,
78 TypeBuilder::OptOutput<bool>* wasThrown); 78 bool includeCommandLineAPI,
79 bool returnByValue,
80 bool generatePreview,
81 RefPtr<TypeBuilder::Runtime::RemoteObject>* result,
82 TypeBuilder::OptOutput<bool>* wasThrown);
79 void restartFrame(ErrorString*, const ScriptValue& callFrames, const String& callFrameId, RefPtr<JSONObject>* result); 83 void restartFrame(ErrorString*, const ScriptValue& callFrames, const String& callFrameId, RefPtr<JSONObject>* result);
80 void getStepInPositions(ErrorString*, const ScriptValue& callFrames, const S tring& callFrameId, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location> > & positions); 84 void getStepInPositions(ErrorString*, const ScriptValue& callFrames, const S tring& callFrameId, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location> > & positions);
81 void setVariableValue(ErrorString*, const ScriptValue& callFrames, const Str ing* callFrameIdOpt, const String* functionObjectIdOpt, int scopeNumber, const S tring& variableName, const String& newValueStr); 85 void setVariableValue(ErrorString*, const ScriptValue& callFrames, const Str ing* callFrameIdOpt, const String* functionObjectIdOpt, int scopeNumber, const S tring& variableName, const String& newValueStr);
82 void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeB uilder::Debugger::FunctionDetails>* result); 86 void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeB uilder::Debugger::FunctionDetails>* result);
83 void getProperties(ErrorString*, const String& objectId, bool ownProperties, bool accessorPropertiesOnly, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::Pr opertyDescriptor> >* result); 87 void getProperties(ErrorString*, const String& objectId, bool ownProperties, bool accessorPropertiesOnly, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::Pr opertyDescriptor> >* result);
84 void getInternalProperties(ErrorString*, const String& objectId, RefPtr<Type Builder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor> >* result); 88 void getInternalProperties(ErrorString*, const String& objectId, RefPtr<Type Builder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor> >* result);
85 Node* nodeForObjectId(const String& objectId); 89 Node* nodeForObjectId(const String& objectId);
86 void releaseObject(const String& objectId); 90 void releaseObject(const String& objectId);
87 91
88 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > wrapCallFr ames(const ScriptValue&); 92 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > wrapCallFr ames(const ScriptValue&, int asyncOrdinal);
89 93
90 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapObject(const ScriptValue& , const String& groupName, bool generatePreview = false) const; 94 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapObject(const ScriptValue& , const String& groupName, bool generatePreview = false) const;
91 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapTable(const ScriptValue& table, const ScriptValue& columns) const; 95 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapTable(const ScriptValue& table, const ScriptValue& columns) const;
92 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapNode(Node*, const String& groupName); 96 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapNode(Node*, const String& groupName);
93 ScriptValue findObjectById(const String& objectId) const; 97 ScriptValue findObjectById(const String& objectId) const;
94 ScriptValue findCallFrameById(ErrorString*, const ScriptValue& topCallFrame, const String& callFrameId); 98 ScriptValue findCallFrameById(ErrorString*, const ScriptValue& topCallFrame, const String& callFrameId);
95 99
96 void inspectNode(Node*); 100 void inspectNode(Node*);
97 void releaseObjectGroup(const String&); 101 void releaseObjectGroup(const String&);
98 102
99 private: 103 private:
100 friend class InjectedScriptModule; 104 friend class InjectedScriptModule;
101 friend InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState*) ; 105 friend InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState*) ;
102 InjectedScript(ScriptObject, InspectedStateAccessCheck); 106 InjectedScript(ScriptObject, InspectedStateAccessCheck);
103 107
104 ScriptValue nodeAsScriptValue(Node*); 108 ScriptValue nodeAsScriptValue(Node*);
105 }; 109 };
106 110
107 111
108 } // namespace WebCore 112 } // namespace WebCore
109 113
110 #endif 114 #endif
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptFunctionCall.cpp ('k') | Source/core/inspector/InjectedScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698