| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 Maybe<protocol::Runtime::ExceptionDetails>*); | 65 Maybe<protocol::Runtime::ExceptionDetails>*); |
| 66 void callFunctionOn( | 66 void callFunctionOn( |
| 67 ErrorString*, | 67 ErrorString*, |
| 68 const String16& objectId, | 68 const String16& objectId, |
| 69 const String16& expression, | 69 const String16& expression, |
| 70 const String16& arguments, | 70 const String16& arguments, |
| 71 bool returnByValue, | 71 bool returnByValue, |
| 72 bool generatePreview, | 72 bool generatePreview, |
| 73 OwnPtr<protocol::Runtime::RemoteObject>* result, | 73 OwnPtr<protocol::Runtime::RemoteObject>* result, |
| 74 Maybe<bool>* wasThrown); | 74 Maybe<bool>* wasThrown); |
| 75 void evaluateOnCallFrame( | |
| 76 ErrorString*, | |
| 77 v8::Local<v8::Object> callFrames, | |
| 78 const String16& callFrameId, | |
| 79 const String16& expression, | |
| 80 const String16& objectGroup, | |
| 81 bool includeCommandLineAPI, | |
| 82 bool returnByValue, | |
| 83 bool generatePreview, | |
| 84 OwnPtr<protocol::Runtime::RemoteObject>* result, | |
| 85 Maybe<bool>* wasThrown, | |
| 86 Maybe<protocol::Runtime::ExceptionDetails>*); | |
| 87 void getFunctionDetails(ErrorString*, const String16& functionId, OwnPtr<pro
tocol::Debugger::FunctionDetails>* result); | 75 void getFunctionDetails(ErrorString*, const String16& functionId, OwnPtr<pro
tocol::Debugger::FunctionDetails>* result); |
| 88 void getCollectionEntries(ErrorString*, const String16& objectId, OwnPtr<pro
tocol::Array<protocol::Debugger::CollectionEntry>>* result); | 76 void getCollectionEntries(ErrorString*, const String16& objectId, OwnPtr<pro
tocol::Array<protocol::Debugger::CollectionEntry>>* result); |
| 89 void getProperties(ErrorString*, const String16& objectId, bool ownPropertie
s, bool accessorPropertiesOnly, bool generatePreview, OwnPtr<protocol::Array<pro
tocol::Runtime::PropertyDescriptor>>* result, Maybe<protocol::Runtime::Exception
Details>*); | 77 void getProperties(ErrorString*, const String16& objectId, bool ownPropertie
s, bool accessorPropertiesOnly, bool generatePreview, OwnPtr<protocol::Array<pro
tocol::Runtime::PropertyDescriptor>>* result, Maybe<protocol::Runtime::Exception
Details>*); |
| 90 void getInternalProperties(ErrorString*, const String16& objectId, Maybe<pro
tocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* result, Maybe<prot
ocol::Runtime::ExceptionDetails>*); | 78 void getInternalProperties(ErrorString*, const String16& objectId, Maybe<pro
tocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* result, Maybe<prot
ocol::Runtime::ExceptionDetails>*); |
| 91 void releaseObject(const String16& objectId); | 79 void releaseObject(const String16& objectId); |
| 92 v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Script>, bool incl
udeCommandLineAPI); | |
| 93 | 80 |
| 94 PassOwnPtr<protocol::Array<protocol::Debugger::CallFrame>> wrapCallFrames(v8
::Local<v8::Object>); | 81 PassOwnPtr<protocol::Array<protocol::Debugger::CallFrame>> wrapCallFrames(v8
::Local<v8::Object>); |
| 95 | 82 |
| 96 PassOwnPtr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8::Value>,
const String16& groupName, bool generatePreview = false) const; | 83 PassOwnPtr<protocol::Runtime::RemoteObject> wrapObject(ErrorString*, v8::Loc
al<v8::Value>, const String16& groupName, bool forceValueType = false, bool gene
ratePreview = false) const; |
| 97 bool wrapObjectProperty(ErrorString*, v8::Local<v8::Object>, v8::Local<v8::V
alue> key, const String16& groupName, bool generatePreview = false) const; | 84 bool wrapObjectProperty(ErrorString*, v8::Local<v8::Object>, v8::Local<v8::V
alue> key, const String16& groupName, bool forceValueType = false, bool generate
Preview = false) const; |
| 98 PassOwnPtr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Value> t
able, v8::Local<v8::Value> columns) const; | 85 PassOwnPtr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Value> t
able, v8::Local<v8::Value> columns) const; |
| 99 v8::Local<v8::Value> findObject(const RemoteObjectId&) const; | 86 v8::Local<v8::Value> findObject(const RemoteObjectId&) const; |
| 100 String16 objectGroupName(const RemoteObjectId&) const; | 87 String16 objectGroupName(const RemoteObjectId&) const; |
| 101 void releaseObjectGroup(const String16&); | 88 void releaseObjectGroup(const String16&); |
| 102 | 89 |
| 103 void setCustomObjectFormatterEnabled(bool); | 90 void setCustomObjectFormatterEnabled(bool); |
| 104 int contextId() { return m_contextId; } | 91 int contextId() { return m_contextId; } |
| 105 String16 origin() const { return m_origin; } | 92 String16 origin() const { return m_origin; } |
| 106 void setOrigin(const String16& origin) { m_origin = origin; } | 93 void setOrigin(const String16& origin) { m_origin = origin; } |
| 107 | 94 |
| 108 v8::Isolate* isolate() { return m_isolate; } | 95 v8::Isolate* isolate() { return m_isolate; } |
| 109 v8::Local<v8::Context> context() const; | 96 v8::Local<v8::Context> context() const; |
| 110 void dispose(); | 97 void dispose(); |
| 98 bool canAccessInspectedWindow() const; |
| 111 | 99 |
| 100 bool setLastEvaluationResult(ErrorString*, v8::Local<v8::Value>); |
| 112 v8::MaybeLocal<v8::Value> resolveCallArgument(ErrorString*, protocol::Runtim
e::CallArgument*); | 101 v8::MaybeLocal<v8::Value> resolveCallArgument(ErrorString*, protocol::Runtim
e::CallArgument*); |
| 113 | 102 |
| 103 v8::MaybeLocal<v8::Object> commandLineAPI(ErrorString*); |
| 104 |
| 105 PassOwnPtr<protocol::Runtime::ExceptionDetails> createExceptionDetails(v8::L
ocal<v8::Message>); |
| 106 void wrapEvaluateResult(ErrorString*, |
| 107 v8::MaybeLocal<v8::Value> maybeResultValue, |
| 108 const v8::TryCatch&, |
| 109 const String16& objectGroup, |
| 110 bool returnByValue, |
| 111 bool generatePreview, |
| 112 OwnPtr<protocol::Runtime::RemoteObject>* result, |
| 113 Maybe<bool>* wasThrown, |
| 114 Maybe<protocol::Runtime::ExceptionDetails>*); |
| 115 |
| 114 private: | 116 private: |
| 115 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8
::Context>); | 117 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8
::Context>); |
| 116 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8:
:Object>, PassOwnPtr<InjectedScriptNative>, int contextId); | 118 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8:
:Object>, PassOwnPtr<InjectedScriptNative>, int contextId); |
| 117 | 119 |
| 118 bool canAccessInspectedWindow() const; | |
| 119 v8::Local<v8::Value> v8Value() const; | 120 v8::Local<v8::Value> v8Value() const; |
| 120 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE
xception) const; | 121 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE
xception) const; |
| 121 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); | 122 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); |
| 122 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun
ctionCall&, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>*
= 0); | 123 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun
ctionCall&, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>*
= 0); |
| 123 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma
ybe<protocol::Runtime::ExceptionDetails>*); | 124 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma
ybe<protocol::Runtime::ExceptionDetails>*); |
| 124 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons
t String16& groupName, bool generatePreview) const; | 125 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons
t String16& groupName, bool forceValueType, bool generatePreview) const; |
| 125 | 126 |
| 126 InjectedScriptManager* m_manager; | 127 InjectedScriptManager* m_manager; |
| 127 v8::Isolate* m_isolate; | 128 v8::Isolate* m_isolate; |
| 128 v8::Global<v8::Context> m_context; | 129 v8::Global<v8::Context> m_context; |
| 129 v8::Global<v8::Value> m_value; | 130 v8::Global<v8::Value> m_value; |
| 130 OwnPtr<InjectedScriptNative> m_native; | 131 OwnPtr<InjectedScriptNative> m_native; |
| 131 int m_contextId; | 132 int m_contextId; |
| 132 String16 m_origin; | 133 String16 m_origin; |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 } // namespace blink | 136 } // namespace blink |
| 136 | 137 |
| 137 #endif | 138 #endif |
| OLD | NEW |