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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h

Issue 1812983002: [DevTools] Move evaluate from InjectedScriptSource.js to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-evaluate-on-call-frame
Patch Set: Removed _callFrameForId Created 4 years, 9 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 class DictionaryValue; 46 class DictionaryValue;
47 } 47 }
48 48
49 49
50 using protocol::Maybe; 50 using protocol::Maybe;
51 51
52 class InjectedScript final { 52 class InjectedScript final {
53 public: 53 public:
54 ~InjectedScript(); 54 ~InjectedScript();
55 55
56 void evaluate(
57 ErrorString*,
58 const String16& expression,
59 const String16& objectGroup,
60 bool includeCommandLineAPI,
61 bool returnByValue,
62 bool generatePreview,
63 OwnPtr<protocol::Runtime::RemoteObject>* result,
64 Maybe<bool>* wasThrown,
65 Maybe<protocol::Runtime::ExceptionDetails>*);
66 void callFunctionOn( 56 void callFunctionOn(
67 ErrorString*, 57 ErrorString*,
68 const String16& objectId, 58 const String16& objectId,
69 const String16& expression, 59 const String16& expression,
70 const String16& arguments, 60 const String16& arguments,
71 bool returnByValue, 61 bool returnByValue,
72 bool generatePreview, 62 bool generatePreview,
73 OwnPtr<protocol::Runtime::RemoteObject>* result, 63 OwnPtr<protocol::Runtime::RemoteObject>* result,
74 Maybe<bool>* wasThrown); 64 Maybe<bool>* wasThrown);
75 void getFunctionDetails(ErrorString*, const String16& functionId, OwnPtr<pro tocol::Debugger::FunctionDetails>* result); 65 void getFunctionDetails(ErrorString*, const String16& functionId, OwnPtr<pro tocol::Debugger::FunctionDetails>* result);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 Maybe<bool>* wasThrown, 103 Maybe<bool>* wasThrown,
114 Maybe<protocol::Runtime::ExceptionDetails>*); 104 Maybe<protocol::Runtime::ExceptionDetails>*);
115 105
116 private: 106 private:
117 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>); 107 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>);
118 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, PassOwnPtr<InjectedScriptNative>, int contextId); 108 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, PassOwnPtr<InjectedScriptNative>, int contextId);
119 109
120 v8::Local<v8::Value> v8Value() const; 110 v8::Local<v8::Value> v8Value() const;
121 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const; 111 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const;
122 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); 112 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&);
123 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun ctionCall&, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>* = 0); 113 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun ctionCall&, Maybe<bool>* wasThrown);
124 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma ybe<protocol::Runtime::ExceptionDetails>*); 114 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma ybe<protocol::Runtime::ExceptionDetails>*);
125 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons t String16& groupName, bool forceValueType, bool generatePreview) const; 115 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons t String16& groupName, bool forceValueType, bool generatePreview) const;
126 116
127 InjectedScriptManager* m_manager; 117 InjectedScriptManager* m_manager;
128 v8::Isolate* m_isolate; 118 v8::Isolate* m_isolate;
129 v8::Global<v8::Context> m_context; 119 v8::Global<v8::Context> m_context;
130 v8::Global<v8::Value> m_value; 120 v8::Global<v8::Value> m_value;
131 OwnPtr<InjectedScriptNative> m_native; 121 OwnPtr<InjectedScriptNative> m_native;
132 int m_contextId; 122 int m_contextId;
133 String16 m_origin; 123 String16 m_origin;
134 }; 124 };
135 125
136 } // namespace blink 126 } // namespace blink
137 127
138 #endif 128 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698