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

Side by Side Diff: chrome/browser/chromeos/arc/gpu_arc_video_service_host.h

Issue 2133503002: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Fix ui_arc_unittests Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "components/arc/arc_bridge_service.h" 10 #include "components/arc/arc_bridge_service.h"
11 #include "components/arc/arc_service.h" 11 #include "components/arc/arc_service.h"
12 #include "components/arc/common/video.mojom.h" 12 #include "components/arc/common/video.mojom.h"
13 #include "mojo/public/cpp/bindings/binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
14 14
15 namespace arc { 15 namespace arc {
16 16
17 // This class takes requests for creating channels of video accelerators from 17 // This class takes requests for creating channels of video accelerators from
18 // arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also 18 // arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also
19 // returns the created channels back to the arc::VideoInstance. 19 // returns the created channels back to the arc::VideoInstance.
20 // 20 //
21 // This class is the proxy end of GpuArcVideoService and runs in the browser 21 // This class is the proxy end of GpuArcVideoService and runs in the browser
22 // process. The corresponding end "GpuArcVideoService" runs in the GPU process. 22 // process. The corresponding end "GpuArcVideoService" runs in the GPU process.
23 class GpuArcVideoServiceHost : public arc::ArcService, 23 class GpuArcVideoServiceHost
24 public arc::ArcBridgeService::Observer, 24 : public arc::ArcService,
25 public arc::mojom::VideoHost { 25 public arc::ArcBridgeService::InstanceObserver<mojom::VideoInstance>,
26 public arc::mojom::VideoHost {
26 public: 27 public:
27 explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service); 28 explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service);
28 ~GpuArcVideoServiceHost() override; 29 ~GpuArcVideoServiceHost() override;
29 30
30 // arc::ArcBridgeService::Observer implementation. 31 // arc::ArcBridgeService::InstanceObserver<mojom::VideoInstance>
31 void OnVideoInstanceReady() override; 32 // implementation.
33 void OnInstanceReady(mojom::VideoInstance* video_instance,
34 uint32_t version) override;
32 35
33 // arc::mojom::VideoHost implementation. 36 // arc::mojom::VideoHost implementation.
34 void DeprecatedOnRequestArcVideoAcceleratorChannel( 37 void DeprecatedOnRequestArcVideoAcceleratorChannel(
35 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) 38 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback)
36 override; 39 override;
37 void OnBootstrapVideoAcceleratorFactory( 40 void OnBootstrapVideoAcceleratorFactory(
38 const OnBootstrapVideoAcceleratorFactoryCallback& callback) override; 41 const OnBootstrapVideoAcceleratorFactoryCallback& callback) override;
39 42
40 private: 43 private:
41 base::ThreadChecker thread_checker_; 44 base::ThreadChecker thread_checker_;
42 45
43 mojo::Binding<arc::mojom::VideoHost> binding_; 46 mojo::Binding<arc::mojom::VideoHost> binding_;
44 47
45 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost); 48 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
46 }; 49 };
47 50
48 } // namespace arc 51 } // namespace arc
49 52
50 #endif // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_ 53 #endif // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698