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

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: More rebasing 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 "components/arc/arc_bridge_service.h" 9 #include "components/arc/arc_bridge_service.h"
10 #include "components/arc/arc_service.h" 10 #include "components/arc/arc_service.h"
11 #include "components/arc/common/video.mojom.h" 11 #include "components/arc/common/video.mojom.h"
12 #include "components/arc/instance_holder.h"
12 #include "mojo/public/cpp/bindings/binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
13 14
14 namespace arc { 15 namespace arc {
15 16
16 // This class takes requests for creating channels of video accelerators from 17 // This class takes requests for creating channels of video accelerators from
17 // arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also 18 // arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also
18 // returns the created channels back to the arc::VideoInstance. 19 // returns the created channels back to the arc::VideoInstance.
19 // 20 //
20 // 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
21 // process. The corresponding end "GpuArcVideoService" runs in the GPU process. 22 // process. The corresponding end "GpuArcVideoService" runs in the GPU process.
22 // 23 //
23 // Lives on the UI thread. 24 // Lives on the UI thread.
24 class GpuArcVideoServiceHost : public arc::ArcService, 25 class GpuArcVideoServiceHost
25 public arc::ArcBridgeService::Observer, 26 : public arc::ArcService,
26 public arc::mojom::VideoHost { 27 public arc::InstanceHolder<mojom::VideoInstance>::Observer,
28 public arc::mojom::VideoHost {
27 public: 29 public:
28 explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service); 30 explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service);
29 ~GpuArcVideoServiceHost() override; 31 ~GpuArcVideoServiceHost() override;
30 32
31 // arc::ArcBridgeService::Observer implementation. 33 // arc::InstanceHolder<mojom::VideoInstance>::Observer implementation.
32 void OnVideoInstanceReady() override; 34 void OnInstanceReady() override;
33 35
34 // arc::mojom::VideoHost implementation. 36 // arc::mojom::VideoHost implementation.
35 void DeprecatedOnRequestArcVideoAcceleratorChannel( 37 void DeprecatedOnRequestArcVideoAcceleratorChannel(
36 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) 38 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback)
37 override; 39 override;
38 void OnBootstrapVideoAcceleratorFactory( 40 void OnBootstrapVideoAcceleratorFactory(
39 const OnBootstrapVideoAcceleratorFactoryCallback& callback) override; 41 const OnBootstrapVideoAcceleratorFactoryCallback& callback) override;
40 42
41 private: 43 private:
42 mojo::Binding<arc::mojom::VideoHost> binding_; 44 mojo::Binding<arc::mojom::VideoHost> binding_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost); 46 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
45 }; 47 };
46 48
47 } // namespace arc 49 } // namespace arc
48 50
49 #endif // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_ 51 #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