OLD | NEW |
---|---|
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 "remoting/client/frame_consumer_proxy.h" | 5 #include "remoting/client/frame_consumer_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 if (!task_runner_->BelongsToCurrentThread()) { | 47 if (!task_runner_->BelongsToCurrentThread()) { |
48 task_runner_->PostTask(FROM_HERE, base::Bind( | 48 task_runner_->PostTask(FROM_HERE, base::Bind( |
49 &FrameConsumerProxy::SetSourceSize, this, source_size, source_dpi)); | 49 &FrameConsumerProxy::SetSourceSize, this, source_size, source_dpi)); |
50 return; | 50 return; |
51 } | 51 } |
52 | 52 |
53 if (frame_consumer_.get()) | 53 if (frame_consumer_.get()) |
54 frame_consumer_->SetSourceSize(source_size, source_dpi); | 54 frame_consumer_->SetSourceSize(source_size, source_dpi); |
55 } | 55 } |
56 | 56 |
57 FrameConsumer::PixelFormat FrameConsumerProxy::GetPixelFormat() { | |
58 return pixel_format_; | |
59 } | |
60 | |
57 void FrameConsumerProxy::Attach( | 61 void FrameConsumerProxy::Attach( |
58 const base::WeakPtr<FrameConsumer>& frame_consumer) { | 62 const base::WeakPtr<FrameConsumer>& frame_consumer) { |
59 DCHECK(task_runner_->BelongsToCurrentThread()); | 63 DCHECK(task_runner_->BelongsToCurrentThread()); |
60 DCHECK(frame_consumer_.get() == NULL); | 64 DCHECK(frame_consumer_.get() == NULL); |
61 frame_consumer_ = frame_consumer; | 65 frame_consumer_ = frame_consumer; |
66 | |
Sergey Ulanov
2013/09/27 21:51:13
remove this line.
Lambros
2013/09/28 00:22:18
Done.
| |
67 pixel_format_ = frame_consumer_->GetPixelFormat(); | |
62 } | 68 } |
63 | 69 |
64 FrameConsumerProxy::~FrameConsumerProxy() { | 70 FrameConsumerProxy::~FrameConsumerProxy() { |
65 } | 71 } |
66 | 72 |
67 } // namespace remoting | 73 } // namespace remoting |
OLD | NEW |