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

Unified Diff: chrome/browser/chromeos/arc/gpu_arc_video_service_host.h

Issue 1641353003: GpuArcVideoService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-4-owen-ArcGpuVideoDecodeAccelerator
Patch Set: fix build Created 4 years, 8 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: chrome/browser/chromeos/arc/gpu_arc_video_service_host.h
diff --git a/chrome/browser/chromeos/arc/gpu_arc_video_service_host.h b/chrome/browser/chromeos/arc/gpu_arc_video_service_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a666c6b369260a8e990965eebc33e4b26150294
--- /dev/null
+++ b/chrome/browser/chromeos/arc/gpu_arc_video_service_host.h
@@ -0,0 +1,58 @@
+// 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 CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
+#define CHROME_BROWSER_CHROMEOS_ARC_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/arc_bridge_service.h"
+#include "components/arc/arc_service.h"
+#include "components/arc/common/video.mojom.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/interface_ptr_info.h"
+
+namespace arc {
+
+// This class takes requests for creating channels of video accelerators from
+// arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also
+// returns the created channels back to the arc::VideoInstance.
+//
+// This class is the proxy end of GpuArcVideoService and runs in the browser
+// process. The corresponding end "GpuArcVideoService" runs in the GPU process.
+class GpuArcVideoServiceHost : public arc::ArcService,
+ public arc::ArcBridgeService::Observer,
+ public arc::VideoHost {
+ public:
+ explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service);
+ ~GpuArcVideoServiceHost() override;
+
+ // arc::ArcBridgeService::Observer implementation.
+ void OnVideoInstanceReady() override;
+ void OnVideoInstanceClosed() override;
+
+ // arc::VideoHost implementation.
+ void OnRequestArcVideoAcceleratorChannel(
+ const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
+
+ private:
+ void BindServiceAndCreateChannel(
+ const OnRequestArcVideoAcceleratorChannelCallback& callback,
+ mojo::InterfacePtrInfo<arc::VideoHost> ptr_info);
+
+ base::ThreadChecker thread_checker_;
+
+ mojo::Binding<arc::VideoHost> binding_;
+
+ arc::VideoHostPtr service_ptr_;
+
+ base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
+};
+
+} // namespace arc
+
+#endif // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
« no previous file with comments | « chrome/browser/chromeos/arc/arc_service_launcher.cc ('k') | chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698