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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 245443005: Move IPC::MessageFilter and router to a separate file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gn build Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/plugin/plugin_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 14
15 #include "content/common/gpu/gpu_channel.h" 15 #include "content/common/gpu/gpu_channel.h"
16 #include "content/common/gpu/gpu_messages.h" 16 #include "content/common/gpu/gpu_messages.h"
17 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
18 #include "gpu/command_buffer/common/command_buffer.h" 18 #include "gpu/command_buffer/common/command_buffer.h"
19 #include "ipc/ipc_message_macros.h" 19 #include "ipc/ipc_message_macros.h"
20 #include "ipc/ipc_message_utils.h" 20 #include "ipc/ipc_message_utils.h"
21 #include "ipc/message_filter.h"
21 #include "media/base/limits.h" 22 #include "media/base/limits.h"
22 #include "ui/gl/gl_context.h" 23 #include "ui/gl/gl_context.h"
23 #include "ui/gl/gl_surface_egl.h" 24 #include "ui/gl/gl_surface_egl.h"
24 25
25 #if defined(OS_WIN) 26 #if defined(OS_WIN)
26 #include "base/win/windows_version.h" 27 #include "base/win/windows_version.h"
27 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" 28 #include "content/common/gpu/media/dxva_video_decode_accelerator.h"
28 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) 29 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
29 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h" 30 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
30 #include "content/common/gpu/media/v4l2_video_device.h" 31 #include "content/common/gpu/media/v4l2_video_device.h"
(...skipping 28 matching lines...) Expand all
59 // DCHECK is on. 60 // DCHECK is on.
60 #if DCHECK_IS_ON 61 #if DCHECK_IS_ON
61 typedef base::AutoLock DebugAutoLock; 62 typedef base::AutoLock DebugAutoLock;
62 #else 63 #else
63 class DebugAutoLock { 64 class DebugAutoLock {
64 public: 65 public:
65 explicit DebugAutoLock(base::Lock&) {} 66 explicit DebugAutoLock(base::Lock&) {}
66 }; 67 };
67 #endif 68 #endif
68 69
69 class GpuVideoDecodeAccelerator::MessageFilter 70 class GpuVideoDecodeAccelerator::MessageFilter : public IPC::MessageFilter {
70 : public IPC::ChannelProxy::MessageFilter {
71 public: 71 public:
72 MessageFilter(GpuVideoDecodeAccelerator* owner, int32 host_route_id) 72 MessageFilter(GpuVideoDecodeAccelerator* owner, int32 host_route_id)
73 : owner_(owner), host_route_id_(host_route_id) {} 73 : owner_(owner), host_route_id_(host_route_id) {}
74 74
75 virtual void OnChannelError() OVERRIDE { channel_ = NULL; } 75 virtual void OnChannelError() OVERRIDE { channel_ = NULL; }
76 76
77 virtual void OnChannelClosing() OVERRIDE { channel_ = NULL; } 77 virtual void OnChannelClosing() OVERRIDE { channel_ = NULL; }
78 78
79 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE { 79 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE {
80 channel_ = channel; 80 channel_ = channel;
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 return stub_->channel()->Send(message); 490 return stub_->channel()->Send(message);
491 } 491 }
492 492
493 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 493 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
494 bool succeeded) { 494 bool succeeded) {
495 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 495 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
496 Send(message); 496 Send(message);
497 } 497 }
498 498
499 } // namespace content 499 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/plugin/plugin_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698