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

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 dcheng's comments 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 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 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/threading/thread_checker.h"
11 #include "components/arc/video/video_host_delegate.h"
12
13 namespace base {
14 class SingleThreadTaskRunner;
15 }
16
17 namespace IPC {
18 struct ChannelHandle;
19 }
20
21 namespace content {
22
23 // This class passes requests from arc::VideoInstance to GpuArcVideoService to
24 // create a video accelerator channel in GPU process and reply the created
25 // channel.
26 //
27 // Don't be confused two senses of "host" of this class. This class, which
28 // implements arc::VideoHost, handles requests from arc::VideoInstance. At the
29 // same time, as its name says, this class is the host of corresponding class,
30 // GpuArcVideoService, in the GPU process.
31 class GpuArcVideoServiceHost : public arc::VideoHostDelegate {
32 public:
33 GpuArcVideoServiceHost();
34 ~GpuArcVideoServiceHost() override;
35
36 // arc::VideoHostDelegate implementation.
37 void OnStopping() override;
38
39 // arc::VideoHost implementation.
40 void OnRequestArcVideoAcceleratorChannel(
41 const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
42
43 private:
44 base::ThreadChecker thread_checker_;
45
46 // IO task runner, where GpuProcessHost tasks run.
47 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
48
49 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
50 };
51
52 } // namespace content
53
54 #endif // CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698