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

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: rebase and addressed luis's comments 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 "base/callback.h"
9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h"
11 #include "base/threading/non_thread_safe.h"
12 #include "components/arc/arc_bridge_service.h"
13 #include "components/arc/common/video.mojom.h"
14 #include "components/arc/video/arc_video_service.h"
15 #include "ipc/ipc_channel_handle.h"
16 #include "ipc/ipc_listener.h"
17 #include "mojo/public/cpp/bindings/binding.h"
18
19 namespace content {
20
21 // This class passes requests from ArcBridgeService to GpuArcVideoService in
22 // GPU process and sends the created channel back to ArcBridgeService.
Pawel Osciak 2015/12/23 06:24:01 s/GpuArcVideoService/GpuArcVideoService to create
kcwu 2015/12/23 09:09:43 Done.
23 class GpuArcVideoServiceHost : public base::NonThreadSafe,
24 public arc::VideoHost,
25 public arc::ArcVideoService,
26 public arc::ArcBridgeService::Observer {
27 public:
28 GpuArcVideoServiceHost();
29 ~GpuArcVideoServiceHost() override;
30
31 // arc::ArcVideoService implementation.
32 void Initialize() override;
33
34 // arc::ArcBridgeService::Observer implementation.
35 void OnStateChanged(arc::ArcBridgeService::State state) override;
36 void OnVideoInstanceReady() override;
37
38 // arc::VideoHost implementation.
39 void OnRequestArcVideoAcceleratorChannel(
40 const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
41
42 private:
43 void ReplyChannelCreated(
Pawel Osciak 2015/12/23 06:24:01 Perhaps OnChannelCreatedReply or HandleChannelCrea
kcwu 2015/12/23 09:09:43 Acknowledged. Removed.
44 const OnRequestArcVideoAcceleratorChannelCallback& callback,
45 const IPC::ChannelHandle& handle);
46 void Shutdown();
Pawel Osciak 2015/12/23 06:24:01 Nit: please empty line above.
kcwu 2015/12/23 09:09:43 Done.
47
48 // IO task runner, where GpuProcessHost tasks run.
49 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
50
51 mojo::Binding<arc::VideoHost> binding_;
52
53 base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_;
54
55 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
56 };
57
58 } // namespace content
59
60 #endif // CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698