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

Side by Side Diff: chrome/renderer/gpu_video_service_host.cc

Issue 6713005: Move a bunch of gpu/worker/plugin renderer code to content. I temporarily disabled the sad plugi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 #include "chrome/renderer/gpu_video_service_host.h"
6
7 #include "chrome/renderer/gpu_video_decoder_host.h"
8 #include "chrome/renderer/render_thread.h"
9 #include "content/common/gpu_messages.h"
10
11 GpuVideoServiceHost::GpuVideoServiceHost()
12 : channel_(NULL),
13 next_decoder_host_id_(0) {
14 }
15
16 void GpuVideoServiceHost::OnFilterAdded(IPC::Channel* channel) {
17 channel_ = channel;
18 }
19
20 void GpuVideoServiceHost::OnFilterRemoved() {
21 // TODO(hclam): Implement.
22 }
23
24 void GpuVideoServiceHost::OnChannelClosing() {
25 // TODO(hclam): Implement.
26 }
27
28 bool GpuVideoServiceHost::OnMessageReceived(const IPC::Message& msg) {
29 switch (msg.type()) {
30 case GpuVideoDecoderHostMsg_CreateVideoDecoderDone::ID:
31 case GpuVideoDecoderHostMsg_InitializeACK::ID:
32 case GpuVideoDecoderHostMsg_DestroyACK::ID:
33 case GpuVideoDecoderHostMsg_FlushACK::ID:
34 case GpuVideoDecoderHostMsg_PrerollDone::ID:
35 case GpuVideoDecoderHostMsg_EmptyThisBufferACK::ID:
36 case GpuVideoDecoderHostMsg_EmptyThisBufferDone::ID:
37 case GpuVideoDecoderHostMsg_ConsumeVideoFrame::ID:
38 case GpuVideoDecoderHostMsg_AllocateVideoFrames::ID:
39 case GpuVideoDecoderHostMsg_ReleaseAllVideoFrames::ID:
40 if (!router_.RouteMessage(msg)) {
41 LOG(ERROR) << "GpuVideoDecoderHostMsg cannot be dispatched.";
42 }
43 return true;
44 default:
45 return false;
46 }
47 }
48
49 GpuVideoDecoderHost* GpuVideoServiceHost::CreateVideoDecoder(
50 int context_route_id) {
51 GpuVideoDecoderHost* host = new GpuVideoDecoderHost(&router_, channel_,
52 context_route_id,
53 next_decoder_host_id_);
54 // TODO(hclam): Handle thread safety of incrementing the ID.
55 ++next_decoder_host_id_;
56 return host;
57 }
OLDNEW
« no previous file with comments | « chrome/renderer/gpu_video_service_host.h ('k') | chrome/renderer/pepper_platform_context_3d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698