| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 v8::Local<v8::Object> callFrames, | 78 v8::Local<v8::Object> callFrames, |
| 79 const String16& callFrameId, | 79 const String16& callFrameId, |
| 80 const String16& expression, | 80 const String16& expression, |
| 81 const String16& objectGroup, | 81 const String16& objectGroup, |
| 82 bool includeCommandLineAPI, | 82 bool includeCommandLineAPI, |
| 83 bool returnByValue, | 83 bool returnByValue, |
| 84 bool generatePreview, | 84 bool generatePreview, |
| 85 OwnPtr<protocol::Runtime::RemoteObject>* result, | 85 OwnPtr<protocol::Runtime::RemoteObject>* result, |
| 86 Maybe<bool>* wasThrown, | 86 Maybe<bool>* wasThrown, |
| 87 Maybe<protocol::Runtime::ExceptionDetails>*); | 87 Maybe<protocol::Runtime::ExceptionDetails>*); |
| 88 void restartFrame(ErrorString*, v8::Local<v8::Object> callFrames, const Stri
ng16& callFrameId); | |
| 89 void setVariableValue(ErrorString*, v8::Local<v8::Object> callFrames, const
Maybe<String16>& callFrameIdOpt, const Maybe<String16>& functionObjectIdOpt, int
scopeNumber, const String16& variableName, const String16& newValueStr); | |
| 90 void getFunctionDetails(ErrorString*, const String16& functionId, OwnPtr<pro
tocol::Debugger::FunctionDetails>* result); | 88 void getFunctionDetails(ErrorString*, const String16& functionId, OwnPtr<pro
tocol::Debugger::FunctionDetails>* 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 bool wrapObjectProperty(ErrorString*, v8::Local<v8::Object>, v8::Local<v8::V
alue> key, const String16& groupName, bool generatePreview = false) const; | 98 bool wrapObjectProperty(ErrorString*, v8::Local<v8::Object>, v8::Local<v8::V
alue> key, const String16& groupName, bool generatePreview = false) const; |
| 101 PassOwnPtr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Value> t
able, v8::Local<v8::Value> columns) const; | 99 PassOwnPtr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Value> t
able, v8::Local<v8::Value> columns) const; |
| 102 v8::Local<v8::Value> findObject(const RemoteObjectId&) const; | 100 v8::Local<v8::Value> findObject(const RemoteObjectId&) const; |
| 103 String16 objectGroupName(const RemoteObjectId&) const; | 101 String16 objectGroupName(const RemoteObjectId&) const; |
| 104 void releaseObjectGroup(const String16&); | 102 void releaseObjectGroup(const String16&); |
| 105 | 103 |
| 106 void setCustomObjectFormatterEnabled(bool); | 104 void setCustomObjectFormatterEnabled(bool); |
| 107 int contextId() { return m_contextId; } | 105 int contextId() { return m_contextId; } |
| 108 String16 origin() const { return m_origin; } | 106 String16 origin() const { return m_origin; } |
| 109 void setOrigin(const String16& origin) { m_origin = origin; } | 107 void setOrigin(const String16& origin) { m_origin = origin; } |
| 110 | 108 |
| 111 v8::Isolate* isolate() { return m_isolate; } | 109 v8::Isolate* isolate() { return m_isolate; } |
| 112 v8::Local<v8::Context> context() const; | 110 v8::Local<v8::Context> context() const; |
| 113 void dispose(); | 111 void dispose(); |
| 114 | 112 |
| 113 v8::MaybeLocal<v8::Value> resolveCallArgument(ErrorString*, protocol::Runtim
e::CallArgument*); |
| 114 |
| 115 private: | 115 private: |
| 116 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8
::Context>); | 116 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8
::Context>); |
| 117 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8:
:Object>, V8DebuggerClient*, PassOwnPtr<InjectedScriptNative>, int contextId); | 117 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8:
:Object>, V8DebuggerClient*, PassOwnPtr<InjectedScriptNative>, int contextId); |
| 118 | 118 |
| 119 bool canAccessInspectedWindow() const; | 119 bool canAccessInspectedWindow() const; |
| 120 v8::Local<v8::Value> v8Value() const; | 120 v8::Local<v8::Value> v8Value() const; |
| 121 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE
xception) const; | 121 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE
xception) const; |
| 122 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); | 122 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); |
| 123 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); |
| 124 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma
ybe<protocol::Runtime::ExceptionDetails>*); | 124 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 generatePreview) const; | 125 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons
t String16& groupName, bool generatePreview) const; |
| 126 | 126 |
| 127 InjectedScriptManager* m_manager; | 127 InjectedScriptManager* m_manager; |
| 128 v8::Isolate* m_isolate; | 128 v8::Isolate* m_isolate; |
| 129 v8::Global<v8::Context> m_context; | 129 v8::Global<v8::Context> m_context; |
| 130 v8::Global<v8::Value> m_value; | 130 v8::Global<v8::Value> m_value; |
| 131 V8DebuggerClient* m_client; | 131 V8DebuggerClient* m_client; |
| 132 OwnPtr<InjectedScriptNative> m_native; | 132 OwnPtr<InjectedScriptNative> m_native; |
| 133 int m_contextId; | 133 int m_contextId; |
| 134 String16 m_origin; | 134 String16 m_origin; |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace blink | 137 } // namespace blink |
| 138 | 138 |
| 139 #endif | 139 #endif |
| OLD | NEW |