| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin/pepper_view_proxy.h" | 5 #include "remoting/client/plugin/pepper_view_proxy.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "remoting/client/client_context.h" | 8 #include "remoting/client/client_context.h" |
| 9 #include "remoting/client/plugin/chromoting_instance.h" | 9 #include "remoting/client/plugin/chromoting_instance.h" |
| 10 | 10 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 139 plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
| 140 this, &PepperViewProxy::ReleaseFrame, make_scoped_refptr(frame))); | 140 this, &PepperViewProxy::ReleaseFrame, make_scoped_refptr(frame))); |
| 141 return; | 141 return; |
| 142 } | 142 } |
| 143 | 143 |
| 144 if (view_) | 144 if (view_) |
| 145 view_->ReleaseFrame(frame); | 145 view_->ReleaseFrame(frame); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void PepperViewProxy::OnPartialFrameOutput(media::VideoFrame* frame, | 148 void PepperViewProxy::OnPartialFrameOutput(media::VideoFrame* frame, |
| 149 UpdatedRects* rects, | 149 RectVector* rects, |
| 150 Task* done) { | 150 Task* done) { |
| 151 if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) { | 151 if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) { |
| 152 plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 152 plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
| 153 this, &PepperViewProxy::OnPartialFrameOutput, | 153 this, &PepperViewProxy::OnPartialFrameOutput, |
| 154 make_scoped_refptr(frame), rects, done)); | 154 make_scoped_refptr(frame), rects, done)); |
| 155 return; | 155 return; |
| 156 } | 156 } |
| 157 | 157 |
| 158 if (view_) | 158 if (view_) |
| 159 view_->OnPartialFrameOutput(frame, rects, done); | 159 view_->OnPartialFrameOutput(frame, rects, done); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void PepperViewProxy::Detach() { | 162 void PepperViewProxy::Detach() { |
| 163 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); | 163 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); |
| 164 instance_ = NULL; | 164 instance_ = NULL; |
| 165 view_ = NULL; | 165 view_ = NULL; |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace remoting | 168 } // namespace remoting |
| OLD | NEW |