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

Side by Side Diff: content/common/gpu/media/media_channel.h

Issue 1845563005: Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gn libs defs 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
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 CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_
6 #define CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_
7 7
8 #include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h" 8 #include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h"
9 #include "ipc/ipc_listener.h" 9 #include "ipc/ipc_listener.h"
10 #include "ipc/ipc_sender.h" 10 #include "ipc/ipc_sender.h"
11 #include "media/video/video_decode_accelerator.h" 11 #include "media/video/video_decode_accelerator.h"
12 12
13 namespace gpu {
14 class GpuChannel;
15 class GpuCommandBufferStub;
16 }
17
13 namespace content { 18 namespace content {
14 19
15 class GpuChannel;
16 class GpuCommandBufferStub;
17 class MediaChannelDispatchHelper; 20 class MediaChannelDispatchHelper;
18 struct CreateVideoEncoderParams; 21 struct CreateVideoEncoderParams;
19 22
20 class MediaChannel : public IPC::Listener, public IPC::Sender { 23 class MediaChannel : public IPC::Listener, public IPC::Sender {
21 public: 24 public:
22 explicit MediaChannel(GpuChannel* channel); 25 explicit MediaChannel(gpu::GpuChannel* channel);
23 ~MediaChannel() override; 26 ~MediaChannel() override;
24 27
25 // IPC::Sender implementation: 28 // IPC::Sender implementation:
26 bool Send(IPC::Message* msg) override; 29 bool Send(IPC::Message* msg) override;
27 30
28 private: 31 private:
29 friend class MediaChannelDispatchHelper; 32 friend class MediaChannelDispatchHelper;
30 33
31 // IPC::Listener implementation: 34 // IPC::Listener implementation:
32 bool OnMessageReceived(const IPC::Message& message) override; 35 bool OnMessageReceived(const IPC::Message& message) override;
33 36
34 // Message handlers. 37 // Message handlers.
35 void OnCreateJpegDecoder(int32_t route_id, IPC::Message* reply_msg); 38 void OnCreateJpegDecoder(int32_t route_id, IPC::Message* reply_msg);
36 void OnCreateVideoDecoder(int32_t command_buffer_route_id, 39 void OnCreateVideoDecoder(int32_t command_buffer_route_id,
37 const media::VideoDecodeAccelerator::Config& config, 40 const media::VideoDecodeAccelerator::Config& config,
38 int32_t route_id, 41 int32_t route_id,
39 IPC::Message* reply_message); 42 IPC::Message* reply_message);
40 void OnCreateVideoEncoder(int32_t command_buffer_route_id, 43 void OnCreateVideoEncoder(int32_t command_buffer_route_id,
41 const CreateVideoEncoderParams& params, 44 const CreateVideoEncoderParams& params,
42 IPC::Message* reply_message); 45 IPC::Message* reply_message);
43 46
44 GpuChannel* const channel_; 47 gpu::GpuChannel* const channel_;
45 scoped_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_; 48 scoped_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_;
46 DISALLOW_COPY_AND_ASSIGN(MediaChannel); 49 DISALLOW_COPY_AND_ASSIGN(MediaChannel);
47 }; 50 };
48 51
49 } // namespace content 52 } // namespace content
50 53
51 #endif // CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_ 54 #endif // CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698