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

Side by Side Diff: test/inspector-protocol/inspector-extension.h

Issue 2358943002: [inspector] added inspector protocol test runner (Closed)
Patch Set: a Created 4 years, 2 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
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_TEST_INSPECTOR_PROTOCOL_INSPECTOR_EXTENSION_H_
6 #define V8_TEST_INSPECTOR_PROTOCOL_INSPECTOR_EXTENSION_H_
7
8 #include "include/v8.h"
9
10 namespace v8_inspector {
11
12 class TaskQueue;
13
14 class BackendExtension : public v8::Extension {
15 public:
16 BackendExtension()
17 : v8::Extension("v8_inspector/backend",
18 "native function evaluateInFrontend();") {}
19 virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
20 v8::Isolate* isolate, v8::Local<v8::String> name);
21
22 static void set_frontend_task_queue(TaskQueue* queue) {
23 frontend_queue_ = queue;
24 }
25
26 private:
27 static void EvaluateInFrontend(
28 const v8::FunctionCallbackInfo<v8::Value>& args);
29
30 static TaskQueue* frontend_queue_;
31 };
32
33 class FrontendExtension : public v8::Extension {
34 public:
35 FrontendExtension()
36 : v8::Extension("v8_inspector/frontend",
37 "native function sendMessageToBackend();") {}
38 virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
39 v8::Isolate* isolate, v8::Local<v8::String> name);
40
41 static void set_backend_task_queue(TaskQueue* queue) {
42 backend_queue_ = queue;
43 }
44
45 private:
46 static void SendMessageToBackend(
47 const v8::FunctionCallbackInfo<v8::Value>& args);
48
49 static TaskQueue* backend_queue_;
50 };
51
52 } // namespace v8_inspector
53
54 #endif // V8_TEST_INSPECTOR_PROTOCOL_INSPECTOR_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698