| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8RuntimeAgent_h | 5 #ifndef V8RuntimeAgent_h |
| 6 #define V8RuntimeAgent_h | 6 #define V8RuntimeAgent_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/inspector_protocol/Dispatcher.h" | 9 #include "platform/inspector_protocol/Dispatcher.h" |
| 10 #include "platform/v8_inspector/public/V8ContextInfo.h" | |
| 11 #include "platform/v8_inspector/public/V8Debugger.h" | 10 #include "platform/v8_inspector/public/V8Debugger.h" |
| 12 | 11 |
| 13 #include <v8.h> | |
| 14 | |
| 15 namespace blink { | 12 namespace blink { |
| 16 | 13 |
| 17 class InjectedScriptManager; | 14 class InjectedScriptManager; |
| 18 | 15 |
| 19 class PLATFORM_EXPORT V8RuntimeAgent : public protocol::Backend::Runtime, public
V8Debugger::Agent<protocol::Frontend::Runtime> { | 16 class PLATFORM_EXPORT V8RuntimeAgent : public protocol::Backend::Runtime, public
V8Debugger::Agent<protocol::Frontend::Runtime> { |
| 20 public: | 17 public: |
| 21 // Cross-context inspectable values (DOM nodes in different worlds, etc.). | |
| 22 class Inspectable { | |
| 23 public: | |
| 24 virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0; | |
| 25 virtual ~Inspectable() { } | |
| 26 }; | |
| 27 | |
| 28 virtual ~V8RuntimeAgent() { } | 18 virtual ~V8RuntimeAgent() { } |
| 29 | |
| 30 // Embedder API. | |
| 31 virtual PassOwnPtr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8:
:Context>, v8::Local<v8::Value>, const String16& groupName, bool generatePreview
= false) = 0; | |
| 32 // FIXME: remove when InspectorConsoleAgent moves into V8 inspector. | |
| 33 virtual PassOwnPtr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::
Context>, v8::Local<v8::Value> table, v8::Local<v8::Value> columns) = 0; | |
| 34 virtual v8::Local<v8::Value> findObject(ErrorString*, const String16& object
Id, v8::Local<v8::Context>* = nullptr, String16* objectGroup = nullptr) = 0; | |
| 35 virtual void disposeObjectGroup(const String16&) = 0; | |
| 36 virtual void addInspectedObject(PassOwnPtr<Inspectable>) = 0; | |
| 37 }; | 19 }; |
| 38 | 20 |
| 39 } // namespace blink | 21 } // namespace blink |
| 40 | 22 |
| 41 #endif // V8RuntimeAgent_h | 23 #endif // V8RuntimeAgent_h |
| OLD | NEW |