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..5c11fcd35546f4eeab4633101c757afc39ff3e18 |
--- /dev/null |
+++ b/content/browser/gpu/gpu_arc_video_service_host.h |
@@ -0,0 +1,50 @@ |
+// 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 <queue> |
+ |
+#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 "ipc/ipc_channel_handle.h" |
+#include "ipc/ipc_listener.h" |
+ |
+namespace content { |
+ |
+class GpuArcVideoServiceHost |
Pawel Osciak
2015/12/16 10:17:58
Please add a short description of what this class
kcwu
2015/12/16 14:05:33
Done.
|
+ : public base::NonThreadSafe, |
+ public arc::ArcBridgeService::Observer, |
+ public arc::ArcBridgeService::VideoServiceObserver { |
+ public: |
+ GpuArcVideoServiceHost( |
+ const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); |
+ ~GpuArcVideoServiceHost() override; |
+ |
+ void Initialize(); |
+ |
+ // arc::ArcBridgeService::Observer implementation. |
+ void OnStateChanged(arc::ArcBridgeService::State state) override; |
+ |
+ // arc::ArcBridgeService::VideoServiceObserver implementation. |
+ void OnRequestArcVideoAcceleratorChannel() override; |
+ |
+ private: |
+ void NotifyArcAcceleratorChannelCreated(const IPC::ChannelHandle& handle); |
+ void Shutdown(); |
+ |
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
+ int num_pending_request_; |
Pawel Osciak
2015/12/16 10:17:58
Please document.
s/num_pending_request_/num_pendi
kcwu
2015/12/16 14:05:33
Done.
|
+ base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_ |