| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 v8::Local<v8::Object> callFrames, | 77 v8::Local<v8::Object> callFrames, |
| 78 const String16& callFrameId, | 78 const String16& callFrameId, |
| 79 const String16& expression, | 79 const String16& expression, |
| 80 const String16& objectGroup, | 80 const String16& objectGroup, |
| 81 bool includeCommandLineAPI, | 81 bool includeCommandLineAPI, |
| 82 bool returnByValue, | 82 bool returnByValue, |
| 83 bool generatePreview, | 83 bool generatePreview, |
| 84 OwnPtr<protocol::Runtime::RemoteObject>* result, | 84 OwnPtr<protocol::Runtime::RemoteObject>* result, |
| 85 Maybe<bool>* wasThrown, | 85 Maybe<bool>* wasThrown, |
| 86 Maybe<protocol::Runtime::ExceptionDetails>*); | 86 Maybe<protocol::Runtime::ExceptionDetails>*); |
| 87 void restartFrame(ErrorString*, v8::Local<v8::Object> callFrames, const Stri
ng16& callFrameId); | |
| 88 void setVariableValue(ErrorString*, v8::Local<v8::Object> callFrames, const
Maybe<String16>& callFrameIdOpt, const Maybe<String16>& functionObjectIdOpt, int
scopeNumber, const String16& variableName, const String16& newValueStr); | |
| 89 void getFunctionDetails(ErrorString*, const String16& functionId, OwnPtr<pro
tocol::Debugger::FunctionDetails>* result); | 87 void getFunctionDetails(ErrorString*, const String16& functionId, OwnPtr<pro
tocol::Debugger::FunctionDetails>* result); |
| 90 void getGeneratorObjectDetails(ErrorString*, const String16& functionId, Own
Ptr<protocol::Debugger::GeneratorObjectDetails>* result); | 88 void getGeneratorObjectDetails(ErrorString*, const String16& functionId, Own
Ptr<protocol::Debugger::GeneratorObjectDetails>* result); |
| 91 void getCollectionEntries(ErrorString*, const String16& objectId, OwnPtr<pro
tocol::Array<protocol::Debugger::CollectionEntry>>* result); | 89 void getCollectionEntries(ErrorString*, const String16& objectId, OwnPtr<pro
tocol::Array<protocol::Debugger::CollectionEntry>>* result); |
| 92 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 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>*); |
| 93 void getInternalProperties(ErrorString*, const String16& objectId, Maybe<pro
tocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* result, Maybe<prot
ocol::Runtime::ExceptionDetails>*); | 91 void getInternalProperties(ErrorString*, const String16& objectId, Maybe<pro
tocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* result, Maybe<prot
ocol::Runtime::ExceptionDetails>*); |
| 94 void releaseObject(const String16& objectId); | 92 void releaseObject(const String16& objectId); |
| 95 v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Script>, bool incl
udeCommandLineAPI); | 93 v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Script>, bool incl
udeCommandLineAPI); |
| 96 | 94 |
| 97 PassOwnPtr<protocol::Array<protocol::Debugger::CallFrame>> wrapCallFrames(v8
::Local<v8::Object>); | 95 PassOwnPtr<protocol::Array<protocol::Debugger::CallFrame>> wrapCallFrames(v8
::Local<v8::Object>); |
| 98 | 96 |
| 99 PassOwnPtr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8::Value>,
const String16& groupName, bool generatePreview = false) const; | 97 PassOwnPtr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8::Value>,
const String16& groupName, bool generatePreview = false) const; |
| 100 PassOwnPtr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Value> t
able, v8::Local<v8::Value> columns) const; | 98 PassOwnPtr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Value> t
able, v8::Local<v8::Value> columns) const; |
| 101 v8::Local<v8::Value> findObject(const RemoteObjectId&) const; | 99 v8::Local<v8::Value> findObject(const RemoteObjectId&) const; |
| 102 String16 objectGroupName(const RemoteObjectId&) const; | 100 String16 objectGroupName(const RemoteObjectId&) const; |
| 103 void releaseObjectGroup(const String16&); | 101 void releaseObjectGroup(const String16&); |
| 104 | 102 |
| 105 void setCustomObjectFormatterEnabled(bool); | 103 void setCustomObjectFormatterEnabled(bool); |
| 106 int contextId() { return m_contextId; } | 104 int contextId() { return m_contextId; } |
| 107 String16 origin() const { return m_origin; } | 105 String16 origin() const { return m_origin; } |
| 108 void setOrigin(const String16& origin) { m_origin = origin; } | 106 void setOrigin(const String16& origin) { m_origin = origin; } |
| 109 | 107 |
| 110 v8::Isolate* isolate() { return m_isolate; } | 108 v8::Isolate* isolate() { return m_isolate; } |
| 111 v8::Local<v8::Context> context() const; | 109 v8::Local<v8::Context> context() const; |
| 112 void dispose(); | 110 void dispose(); |
| 113 | 111 |
| 112 v8::MaybeLocal<v8::Value> resolveCallArgument(ErrorString*, protocol::Runtim
e::CallArgument*); |
| 113 |
| 114 private: | 114 private: |
| 115 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8
::Context>); | 115 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8
::Context>); |
| 116 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8:
:Object>, PassOwnPtr<InjectedScriptNative>, int contextId); | 116 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8:
:Object>, PassOwnPtr<InjectedScriptNative>, int contextId); |
| 117 | 117 |
| 118 bool canAccessInspectedWindow() const; | 118 bool canAccessInspectedWindow() const; |
| 119 v8::Local<v8::Value> v8Value() const; | 119 v8::Local<v8::Value> v8Value() const; |
| 120 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE
xception) const; | 120 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE
xception) const; |
| 121 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); | 121 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); |
| 122 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun
ctionCall&, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>*
= 0); | 122 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>*); | 123 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma
ybe<protocol::Runtime::ExceptionDetails>*); |
| 124 | 124 |
| 125 InjectedScriptManager* m_manager; | 125 InjectedScriptManager* m_manager; |
| 126 v8::Isolate* m_isolate; | 126 v8::Isolate* m_isolate; |
| 127 v8::Global<v8::Context> m_context; | 127 v8::Global<v8::Context> m_context; |
| 128 v8::Global<v8::Value> m_value; | 128 v8::Global<v8::Value> m_value; |
| 129 OwnPtr<InjectedScriptNative> m_native; | 129 OwnPtr<InjectedScriptNative> m_native; |
| 130 int m_contextId; | 130 int m_contextId; |
| 131 String16 m_origin; | 131 String16 m_origin; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| 135 | 135 |
| 136 #endif | 136 #endif |
| OLD | NEW |