OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/renderer/gpu_video_service_host.h" | 5 #include "content/renderer/gpu_video_service_host.h" |
6 | 6 |
7 #include "chrome/renderer/gpu_video_decoder_host.h" | |
8 #include "chrome/renderer/render_thread.h" | 7 #include "chrome/renderer/render_thread.h" |
| 8 #include "content/renderer/gpu_video_decoder_host.h" |
9 #include "content/common/gpu_messages.h" | 9 #include "content/common/gpu_messages.h" |
10 | 10 |
11 GpuVideoServiceHost::GpuVideoServiceHost() | 11 GpuVideoServiceHost::GpuVideoServiceHost() |
12 : channel_(NULL), | 12 : channel_(NULL), |
13 next_decoder_host_id_(0) { | 13 next_decoder_host_id_(0) { |
14 } | 14 } |
15 | 15 |
16 void GpuVideoServiceHost::OnFilterAdded(IPC::Channel* channel) { | 16 void GpuVideoServiceHost::OnFilterAdded(IPC::Channel* channel) { |
17 channel_ = channel; | 17 channel_ = channel; |
18 } | 18 } |
(...skipping 29 matching lines...) Expand all Loading... |
48 | 48 |
49 GpuVideoDecoderHost* GpuVideoServiceHost::CreateVideoDecoder( | 49 GpuVideoDecoderHost* GpuVideoServiceHost::CreateVideoDecoder( |
50 int context_route_id) { | 50 int context_route_id) { |
51 GpuVideoDecoderHost* host = new GpuVideoDecoderHost(&router_, channel_, | 51 GpuVideoDecoderHost* host = new GpuVideoDecoderHost(&router_, channel_, |
52 context_route_id, | 52 context_route_id, |
53 next_decoder_host_id_); | 53 next_decoder_host_id_); |
54 // TODO(hclam): Handle thread safety of incrementing the ID. | 54 // TODO(hclam): Handle thread safety of incrementing the ID. |
55 ++next_decoder_host_id_; | 55 ++next_decoder_host_id_; |
56 return host; | 56 return host; |
57 } | 57 } |
OLD | NEW |