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

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

Issue 2190483003: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2785
Patch Set: One less diff line Created 4 years, 4 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 "components/arc/instance_holder.h"
13 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
14 15
15 namespace arc { 16 namespace arc {
16 17
17 // This class takes requests for creating channels of video accelerators from 18 // This class takes requests for creating channels of video accelerators from
18 // arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also 19 // arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also
19 // returns the created channels back to the arc::VideoInstance. 20 // returns the created channels back to the arc::VideoInstance.
20 // 21 //
21 // This class is the proxy end of GpuArcVideoService and runs in the browser 22 // This class is the proxy end of GpuArcVideoService and runs in the browser
22 // process. The corresponding end "GpuArcVideoService" runs in the GPU process. 23 // process. The corresponding end "GpuArcVideoService" runs in the GPU process.
23 class GpuArcVideoServiceHost : public arc::ArcService, 24 class GpuArcVideoServiceHost
24 public arc::ArcBridgeService::Observer, 25 : public arc::ArcService,
25 public arc::mojom::VideoHost { 26 public arc::InstanceHolder<mojom::VideoInstance>::Observer,
27 public arc::mojom::VideoHost {
26 public: 28 public:
27 explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service); 29 explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service);
28 ~GpuArcVideoServiceHost() override; 30 ~GpuArcVideoServiceHost() override;
29 31
30 // arc::ArcBridgeService::Observer implementation. 32 // arc::InstanceHolder<mojom::VideoInstance>::Observer implementation.
31 void OnVideoInstanceReady() override; 33 void OnInstanceReady() override;
32 34
33 // arc::mojom::VideoHost implementation. 35 // arc::mojom::VideoHost implementation.
34 void DeprecatedOnRequestArcVideoAcceleratorChannel( 36 void DeprecatedOnRequestArcVideoAcceleratorChannel(
35 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) 37 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback)
36 override; 38 override;
37 void OnBootstrapVideoAcceleratorFactory( 39 void OnBootstrapVideoAcceleratorFactory(
38 const OnBootstrapVideoAcceleratorFactoryCallback& callback) override; 40 const OnBootstrapVideoAcceleratorFactoryCallback& callback) override;
39 41
40 private: 42 private:
41 base::ThreadChecker thread_checker_; 43 base::ThreadChecker thread_checker_;
42 44
43 mojo::Binding<arc::mojom::VideoHost> binding_; 45 mojo::Binding<arc::mojom::VideoHost> binding_;
44 46
45 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost); 47 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
46 }; 48 };
47 49
48 } // namespace arc 50 } // namespace arc
49 51
50 #endif // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_ 52 #endif // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_settings_service.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