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

Side by Side 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 unified diff | Download patch
OLDNEW
(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 "base/memory/ref_counted.h"
10 #include "base/threading/thread_checker.h"
11 #include "components/arc/arc_bridge_service.h"
12 #include "components/arc/arc_service.h"
13 #include "components/arc/common/video.mojom.h"
14 #include "mojo/public/cpp/bindings/binding.h"
15 #include "mojo/public/cpp/bindings/interface_ptr_info.h"
16
17 namespace arc {
18
19 // This class takes requests for creating channels of video accelerators from
20 // arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also
21 // returns the created channels back to the arc::VideoInstance.
22 //
23 // This class is the proxy end of GpuArcVideoService and runs in the browser
24 // process. The corresponding end "GpuArcVideoService" runs in the GPU process.
25 class GpuArcVideoServiceHost : public arc::ArcService,
26 public arc::ArcBridgeService::Observer,
27 public arc::VideoHost {
28 public:
29 explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service);
30 ~GpuArcVideoServiceHost() override;
31
32 // arc::ArcBridgeService::Observer implementation.
33 void OnVideoInstanceReady() override;
34 void OnVideoInstanceClosed() override;
35
36 // arc::VideoHost implementation.
37 void OnRequestArcVideoAcceleratorChannel(
38 const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
39
40 private:
41 void BindServiceAndCreateChannel(
42 const OnRequestArcVideoAcceleratorChannelCallback& callback,
43 mojo::InterfacePtrInfo<arc::VideoHost> ptr_info);
44
45 base::ThreadChecker thread_checker_;
46
47 mojo::Binding<arc::VideoHost> binding_;
48
49 arc::VideoHostPtr service_ptr_;
50
51 base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_;
52
53 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
54 };
55
56 } // namespace arc
57
58 #endif // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
OLDNEW
« 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