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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h

Issue 1738073002: DevTools: introduce protocol::Value, baseline for hierarchical data in remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 23 matching lines...) Expand all
34 #include "platform/inspector_protocol/TypeBuilder.h" 34 #include "platform/inspector_protocol/TypeBuilder.h"
35 #include "platform/v8_inspector/InjectedScriptManager.h" 35 #include "platform/v8_inspector/InjectedScriptManager.h"
36 #include "platform/v8_inspector/InjectedScriptNative.h" 36 #include "platform/v8_inspector/InjectedScriptNative.h"
37 #include "wtf/Allocator.h" 37 #include "wtf/Allocator.h"
38 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
39 #include <v8.h> 39 #include <v8.h>
40 40
41 namespace blink { 41 namespace blink {
42 42
43 class InjectedScriptManager; 43 class InjectedScriptManager;
44 class JSONValue;
45 class RemoteObjectId; 44 class RemoteObjectId;
46 class V8FunctionCall; 45 class V8FunctionCall;
47 class V8DebuggerClient; 46 class V8DebuggerClient;
48 47
48 namespace protocol {
49 class DictionaryValue;
50 }
51
49 typedef String ErrorString; 52 typedef String ErrorString;
50 53
51 using protocol::Maybe; 54 using protocol::Maybe;
52 55
53 class InjectedScript final { 56 class InjectedScript final {
54 USING_FAST_MALLOC(InjectedScript); 57 USING_FAST_MALLOC(InjectedScript);
55 public: 58 public:
56 ~InjectedScript(); 59 ~InjectedScript();
57 60
58 void evaluate( 61 void evaluate(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 v8::Local<v8::Context> context() const; 118 v8::Local<v8::Context> context() const;
116 void dispose(); 119 void dispose();
117 120
118 private: 121 private:
119 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>); 122 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>);
120 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, V8DebuggerClient*, PassRefPtr<InjectedScriptNative>, int contextId); 123 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, V8DebuggerClient*, PassRefPtr<InjectedScriptNative>, int contextId);
121 124
122 bool canAccessInspectedWindow() const; 125 bool canAccessInspectedWindow() const;
123 v8::Local<v8::Value> v8Value() const; 126 v8::Local<v8::Value> v8Value() const;
124 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const; 127 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const;
125 void makeCall(V8FunctionCall&, RefPtr<JSONValue>* result); 128 void makeCall(V8FunctionCall&, RefPtr<protocol::Value>* result);
126 void makeEvalCall(ErrorString*, V8FunctionCall&, OwnPtr<protocol::Runtime::R emoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::Exception Details>* = 0); 129 void makeEvalCall(ErrorString*, V8FunctionCall&, OwnPtr<protocol::Runtime::R emoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::Exception Details>* = 0);
127 void makeCallWithExceptionDetails(V8FunctionCall&, RefPtr<JSONValue>* result , Maybe<protocol::Runtime::ExceptionDetails>*); 130 void makeCallWithExceptionDetails(V8FunctionCall&, RefPtr<protocol::Value>* result, Maybe<protocol::Runtime::ExceptionDetails>*);
128 131
129 InjectedScriptManager* m_manager; 132 InjectedScriptManager* m_manager;
130 v8::Isolate* m_isolate; 133 v8::Isolate* m_isolate;
131 v8::Global<v8::Context> m_context; 134 v8::Global<v8::Context> m_context;
132 v8::Global<v8::Value> m_value; 135 v8::Global<v8::Value> m_value;
133 V8DebuggerClient* m_client; 136 V8DebuggerClient* m_client;
134 RefPtr<InjectedScriptNative> m_native; 137 RefPtr<InjectedScriptNative> m_native;
135 int m_contextId; 138 int m_contextId;
136 String m_origin; 139 String m_origin;
137 }; 140 };
138 141
139 } // namespace blink 142 } // namespace blink
140 143
141 #endif 144 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698