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: nits Created 5 years 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 <queue>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/threading/non_thread_safe.h"
14 #include "components/arc/arc_bridge_service.h"
15 #include "ipc/ipc_channel_handle.h"
16 #include "ipc/ipc_listener.h"
17
18 namespace content {
19
20 // This class passes requests from ArcBridgeService to GpuArcVideoService in
21 // GPU process and sends the created channel back to ArcBridgeService.
22 class GpuArcVideoServiceHost : public base::NonThreadSafe,
23 public arc::ArcBridgeService::Observer,
24 public arc::ArcBridgeService::VideoService {
Luis Héctor Chávez 2015/12/16 16:37:22 instead of an arc::ArcBridgeService::VideoService,
kcwu 2015/12/22 11:58:25 Done.
25 public:
26 GpuArcVideoServiceHost(
27 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
28 ~GpuArcVideoServiceHost() override;
29
30 void Initialize();
31
32 // arc::ArcBridgeService::Observer implementation.
33 void OnStateChanged(arc::ArcBridgeService::State state) override;
34
35 // arc::ArcBridgeService::VideoService implementation.
36 void OnRequestArcVideoAcceleratorChannel() override;
37
38 private:
39 void NotifyArcAcceleratorChannelCreated(const IPC::ChannelHandle& handle);
40 void Shutdown();
41
42 // IO task runner, where GpuProcessHost tasks run.
43 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
44
45 // Number of requests are send to GPU but not responsed yet.
46 int num_pending_requests_;
47
48 base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_;
49
50 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
51 };
52
53 } // namespace content
54
55 #endif // CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698