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

Unified Diff: test/inspector-protocol/task-queue.h

Issue 2358943002: [inspector] added inspector protocol test runner (Closed)
Patch Set: a Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: test/inspector-protocol/task-queue.h
diff --git a/test/inspector-protocol/task-queue.h b/test/inspector-protocol/task-queue.h
new file mode 100644
index 0000000000000000000000000000000000000000..8b2bbd238b3cca17b4a98854a99088ad59c0dd96
--- /dev/null
+++ b/test/inspector-protocol/task-queue.h
@@ -0,0 +1,38 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_TEST_INSPECTOR_PROTOCOL_TASK_QUEUE_H_
+#define V8_TEST_INSPECTOR_PROTOCOL_TASK_QUEUE_H_
+
+#include "include/v8.h"
+#include "src/base/macros.h"
+#include "src/base/platform/platform.h"
+#include "src/locked-queue-inl.h"
+
+namespace v8_inspector {
+
+class Task;
+
+class TaskQueue {
+ public:
+ TaskQueue();
+ ~TaskQueue();
+
+ void Append(Task* task);
+ Task* GetNext(bool only_protocol);
+
+ void SetContext(v8::Local<v8::Context>);
+ static TaskQueue* FromContext(v8::Local<v8::Context>);
+
+ private:
+ v8::internal::LockedQueue<Task*> queue_;
+ v8::internal::LockedQueue<Task*> deffered_queue_;
+ v8::base::Semaphore process_queue_semaphore_;
+
+ DISALLOW_COPY_AND_ASSIGN(TaskQueue);
+};
+
+} // v8_inspector
+
+#endif // V8_TEST_INSPECTOR_PROTOCOL_TASK_QUEUE_H_

Powered by Google App Engine
This is Rietveld 408576698