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..2348b5572e1d12ed51f5f00ebdf511f070887844 |
--- /dev/null |
+++ b/content/browser/gpu/gpu_arc_video_service_host.h |
@@ -0,0 +1,60 @@ |
+// Copyright 2015 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/callback.h" |
+#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
+#include "base/threading/non_thread_safe.h" |
+#include "components/arc/arc_bridge_service.h" |
+#include "components/arc/common/video.mojom.h" |
+#include "components/arc/video/arc_video_service.h" |
+#include "ipc/ipc_channel_handle.h" |
+#include "ipc/ipc_listener.h" |
+#include "mojo/public/cpp/bindings/binding.h" |
+ |
+namespace content { |
+ |
+// This class passes requests from ArcBridgeService to GpuArcVideoService in |
+// GPU process and sends the created channel back to ArcBridgeService. |
Pawel Osciak
2015/12/23 06:24:01
s/GpuArcVideoService/GpuArcVideoService to create
kcwu
2015/12/23 09:09:43
Done.
|
+class GpuArcVideoServiceHost : public base::NonThreadSafe, |
+ public arc::VideoHost, |
+ public arc::ArcVideoService, |
+ public arc::ArcBridgeService::Observer { |
+ public: |
+ GpuArcVideoServiceHost(); |
+ ~GpuArcVideoServiceHost() override; |
+ |
+ // arc::ArcVideoService implementation. |
+ void Initialize() override; |
+ |
+ // arc::ArcBridgeService::Observer implementation. |
+ void OnStateChanged(arc::ArcBridgeService::State state) override; |
+ void OnVideoInstanceReady() override; |
+ |
+ // arc::VideoHost implementation. |
+ void OnRequestArcVideoAcceleratorChannel( |
+ const OnRequestArcVideoAcceleratorChannelCallback& callback) override; |
+ |
+ private: |
+ void ReplyChannelCreated( |
Pawel Osciak
2015/12/23 06:24:01
Perhaps OnChannelCreatedReply or HandleChannelCrea
kcwu
2015/12/23 09:09:43
Acknowledged.
Removed.
|
+ const OnRequestArcVideoAcceleratorChannelCallback& callback, |
+ const IPC::ChannelHandle& handle); |
+ void Shutdown(); |
Pawel Osciak
2015/12/23 06:24:01
Nit: please empty line above.
kcwu
2015/12/23 09:09:43
Done.
|
+ |
+ // IO task runner, where GpuProcessHost tasks run. |
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
+ |
+ mojo::Binding<arc::VideoHost> binding_; |
+ |
+ base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_ |