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

Side by Side Diff: chrome/gpu/gpu_arc_video_service.h

Issue 1885683005: Add module suffix in .mojom files for components/arc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only 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
« no previous file with comments | « chrome/gpu/chrome_content_gpu_client.cc ('k') | chrome/gpu/gpu_arc_video_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_GPU_GPU_ARC_VIDEO_SERVICE_H_ 5 #ifndef CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
6 #define CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_ 6 #define CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/arc/common/video.mojom.h" 12 #include "components/arc/common/video.mojom.h"
13 #include "mojo/public/cpp/bindings/strong_binding.h" 13 #include "mojo/public/cpp/bindings/strong_binding.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 namespace arc { 16 namespace arc {
17 17
18 // GpuArcVideoService manages life-cycle and IPC message translation for 18 // GpuArcVideoService manages life-cycle and IPC message translation for
19 // ArcVideoAccelerator. 19 // ArcVideoAccelerator.
20 // 20 //
21 // For each creation request from GpuArcVideoServiceHost, GpuArcVideoService 21 // For each creation request from GpuArcVideoServiceHost, GpuArcVideoService
22 // will create a new IPC channel. 22 // will create a new IPC channel.
23 class GpuArcVideoService : public ::arc::VideoHost { 23 class GpuArcVideoService : public ::arc::mojom::VideoHost {
24 public: 24 public:
25 class AcceleratorStub; 25 class AcceleratorStub;
26 26
27 // |request| is mojo interface request of arc::VideoHost. 27 // |request| is mojo interface request of arc::mojom::VideoHost.
28 explicit GpuArcVideoService(mojo::InterfaceRequest<::arc::VideoHost> request); 28 explicit GpuArcVideoService(
29 mojo::InterfaceRequest<::arc::mojom::VideoHost> request);
29 30
30 // Upon deletion, all ArcVideoAccelerator will be deleted and the associated 31 // Upon deletion, all ArcVideoAccelerator will be deleted and the associated
31 // IPC channels are closed. 32 // IPC channels are closed.
32 ~GpuArcVideoService() override; 33 ~GpuArcVideoService() override;
33 34
34 // Removes the reference of |stub| (and trigger deletion) from this class. 35 // Removes the reference of |stub| (and trigger deletion) from this class.
35 void RemoveClient(AcceleratorStub* stub); 36 void RemoveClient(AcceleratorStub* stub);
36 37
37 private: 38 private:
38 // arc::VideoHost implementation. 39 // arc::mojom::VideoHost implementation.
39 void OnRequestArcVideoAcceleratorChannel( 40 void OnRequestArcVideoAcceleratorChannel(
40 const OnRequestArcVideoAcceleratorChannelCallback& callback) override; 41 const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
41 42
42 base::ThreadChecker thread_checker_; 43 base::ThreadChecker thread_checker_;
43 44
44 // Binding of arc::VideoHost. It also takes ownership of |this|. 45 // Binding of arc::mojom::VideoHost. It also takes ownership of |this|.
45 mojo::StrongBinding<::arc::VideoHost> binding_; 46 mojo::StrongBinding<::arc::mojom::VideoHost> binding_;
46 47
47 // Bookkeeping all accelerator stubs. 48 // Bookkeeping all accelerator stubs.
48 std::map<AcceleratorStub*, std::unique_ptr<AcceleratorStub>> 49 std::map<AcceleratorStub*, std::unique_ptr<AcceleratorStub>>
49 accelerator_stubs_; 50 accelerator_stubs_;
50 51
51 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoService); 52 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoService);
52 }; 53 };
53 54
54 } // namespace arc 55 } // namespace arc
55 } // namespace chromeos 56 } // namespace chromeos
56 57
57 #endif // CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_ 58 #endif // CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/gpu/chrome_content_gpu_client.cc ('k') | chrome/gpu/gpu_arc_video_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698