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

Side by Side Diff: content/browser/gpu/gpu_arc_video_service_host.h

Issue 1451353002: Implement GpuArcVideoService for arc video accelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Owen's comments: split GpuArcVideoServiceHost and named the new code arc::ArcVideoBridge Created 4 years, 11 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 2015 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 CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_
6 #define CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h"
11 #include "base/threading/thread_checker.h"
12 #include "components/arc/video/video_host_delegate.h"
13
14 namespace base {
15 class SingleThreadTaskRunner;
16 }
17
18 namespace IPC {
19 struct ChannelHandle;
20 }
21
22 namespace content {
23
24 // This class passes requests from arc::VideoInstance to GpuArcVideoService to
25 // create a video accelerator channel in GPU process and reply the created
26 // channel.
27 //
28 // Don't be confused two senses of "host" of this class. This class, which
29 // implements arc::VideoHost, handles requests from arc::VideoInstance. At the
30 // same time, as its name says, this class is the host of corresponding class,
31 // GpuArcVideoService, on GPU process.
32 class GpuArcVideoServiceHost : public arc::VideoHostDelegate {
33 public:
34 GpuArcVideoServiceHost();
35 ~GpuArcVideoServiceHost() override;
36
37 // arc::VideoHostDelegate implementation.
38 void Shutdown() override;
39
40 // arc::VideoHost implementation.
41 void OnRequestArcVideoAcceleratorChannel(
42 const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
43
44 private:
45 void HandleChannelCreatedReply(
46 const OnRequestArcVideoAcceleratorChannelCallback& callback,
47 const IPC::ChannelHandle& handle);
48
49 base::ThreadChecker thread_checker_;
50
51 // IO task runner, where GpuProcessHost tasks run.
52 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
53
54 base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_;
55
56 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
57 };
58
59 } // namespace content
60
61 #endif // CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698