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

Unified Diff: content/browser/gpu/gpu_arc_video_service_host.h

Issue 1451353002: Implement GpuArcVideoService for arc video accelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase: follow ArcBridgeService changes Created 4 years, 11 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: content/browser/gpu/gpu_arc_video_service_host.h
diff --git a/content/browser/gpu/gpu_arc_video_service_host.h b/content/browser/gpu/gpu_arc_video_service_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..5768efbcad373dcf1a288a8c928a64d207bd11ab
--- /dev/null
+++ b/content/browser/gpu/gpu_arc_video_service_host.h
@@ -0,0 +1,54 @@
+// Copyright 2016 The Chromium 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 CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_
+#define CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/threading/thread_checker.h"
+#include "components/arc/video/video_host_delegate.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+}
+
+namespace IPC {
+struct ChannelHandle;
+}
+
+namespace content {
+
+// This class passes requests from arc::VideoInstance to GpuArcVideoService to
+// create a video accelerator channel in GPU process and reply the created
+// channel.
+//
+// Don't be confused two senses of "host" of this class. This class, which
+// implements arc::VideoHost, handles requests from arc::VideoInstance. At the
+// same time, as its name says, this class is the host of corresponding class,
+// GpuArcVideoService, on GPU process.
dcheng 2016/01/08 09:11:15 Nit: in the GPU process.
kcwu 2016/01/08 10:32:09 Done.
+class GpuArcVideoServiceHost : public arc::VideoHostDelegate {
+ public:
+ GpuArcVideoServiceHost();
+ ~GpuArcVideoServiceHost() override;
+
+ // arc::VideoHostDelegate implementation.
+ void OnStopping() override;
+
+ // arc::VideoHost implementation.
+ void OnRequestArcVideoAcceleratorChannel(
+ const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
+
+ private:
+ base::ThreadChecker thread_checker_;
+
+ // IO task runner, where GpuProcessHost tasks run.
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698