| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "components/arc/arc_service.h" | |
| 10 #include "components/arc/common/video.mojom.h" | |
| 11 #include "components/arc/instance_holder.h" | |
| 12 #include "mojo/public/cpp/bindings/binding.h" | |
| 13 | |
| 14 namespace arc { | |
| 15 | |
| 16 class ArcBridgeService; | |
| 17 | |
| 18 // This class takes requests for creating channels of video accelerators from | |
| 19 // arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also | |
| 20 // returns the created channels back to the arc::VideoInstance. | |
| 21 // | |
| 22 // This class is the proxy end of GpuArcVideoService and runs in the browser | |
| 23 // process. The corresponding end "GpuArcVideoService" runs in the GPU process. | |
| 24 // | |
| 25 // Lives on the UI thread. | |
| 26 class GpuArcVideoServiceHost | |
| 27 : public ArcService, | |
| 28 public InstanceHolder<mojom::VideoInstance>::Observer, | |
| 29 public mojom::VideoHost { | |
| 30 public: | |
| 31 explicit GpuArcVideoServiceHost(ArcBridgeService* bridge_service); | |
| 32 ~GpuArcVideoServiceHost() override; | |
| 33 | |
| 34 // arc::InstanceHolder<mojom::VideoInstance>::Observer implementation. | |
| 35 void OnInstanceReady() override; | |
| 36 | |
| 37 // arc::mojom::VideoHost implementation. | |
| 38 void DeprecatedOnRequestArcVideoAcceleratorChannel( | |
| 39 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) | |
| 40 override; | |
| 41 void OnBootstrapVideoAcceleratorFactory( | |
| 42 const OnBootstrapVideoAcceleratorFactoryCallback& callback) override; | |
| 43 | |
| 44 private: | |
| 45 mojo::Binding<mojom::VideoHost> binding_; | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost); | |
| 48 }; | |
| 49 | |
| 50 } // namespace arc | |
| 51 | |
| 52 #endif // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_ | |
| OLD | NEW |