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

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: 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 25 matching lines...) Expand all
101 v8::MaybeLocal<v8::Value> resolveCallArgument(ErrorString*, protocol::Runtim e::CallArgument*); 91 v8::MaybeLocal<v8::Value> resolveCallArgument(ErrorString*, protocol::Runtim e::CallArgument*);
102 92
103 private: 93 private:
104 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>); 94 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>);
105 friend InjectedScriptManager::InjectScopeExtensionByName; 95 friend InjectedScriptManager::InjectScopeExtensionByName;
106 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, PassOwnPtr<InjectedScriptNative>, int contextId); 96 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, PassOwnPtr<InjectedScriptNative>, int contextId);
107 97
108 v8::Local<v8::Value> v8Value() const; 98 v8::Local<v8::Value> v8Value() const;
109 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const; 99 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const;
110 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); 100 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&);
111 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun ctionCall&, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>* = 0); 101 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun ctionCall&, Maybe<bool>* wasThrown);
112 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma ybe<protocol::Runtime::ExceptionDetails>*); 102 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma ybe<protocol::Runtime::ExceptionDetails>*);
113 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons t String16& groupName, bool forceValueType, bool generatePreview) const; 103 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons t String16& groupName, bool forceValueType, bool generatePreview) const;
114 v8::MaybeLocal<v8::Object> scopeExtensionByName(ErrorString*, const String16 & name); 104 v8::MaybeLocal<v8::Object> scopeExtensionByName(ErrorString*, const String16 & name);
115 105
116 InjectedScriptManager* m_manager; 106 InjectedScriptManager* m_manager;
117 v8::Isolate* m_isolate; 107 v8::Isolate* m_isolate;
118 v8::Global<v8::Context> m_context; 108 v8::Global<v8::Context> m_context;
119 v8::Global<v8::Value> m_value; 109 v8::Global<v8::Value> m_value;
120 OwnPtr<InjectedScriptNative> m_native; 110 OwnPtr<InjectedScriptNative> m_native;
121 int m_contextId; 111 int m_contextId;
122 String16 m_origin; 112 String16 m_origin;
123 }; 113 };
124 114
125 } // namespace blink 115 } // namespace blink
126 116
127 #endif 117 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698