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/plugin/pepper_view.h" | 5 #include "remoting/client/plugin/pepper_view.h" |
6 | 6 |
7 #include <functional> | 7 #include <functional> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 ChromotingInstance::STATE_FAILED, | 143 ChromotingInstance::STATE_FAILED, |
144 ConvertConnectionError(error)); | 144 ConvertConnectionError(error)); |
145 break; | 145 break; |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 protocol::ClipboardStub* PepperView::GetClipboardStub() { | 149 protocol::ClipboardStub* PepperView::GetClipboardStub() { |
150 return instance_; | 150 return instance_; |
151 } | 151 } |
152 | 152 |
| 153 protocol::CursorShapeStub* PepperView::GetCursorShapeStub() { |
| 154 return instance_; |
| 155 } |
| 156 |
153 void PepperView::SetView(const SkISize& view_size, const SkIRect& clip_area) { | 157 void PepperView::SetView(const SkISize& view_size, const SkIRect& clip_area) { |
154 bool view_changed = false; | 158 bool view_changed = false; |
155 | 159 |
156 if (view_size_ != view_size) { | 160 if (view_size_ != view_size) { |
157 view_changed = true; | 161 view_changed = true; |
158 view_size_ = view_size; | 162 view_size_ = view_size; |
159 | 163 |
160 pp::Size pp_size = pp::Size(view_size_.width(), view_size_.height()); | 164 pp::Size pp_size = pp::Size(view_size_.width(), view_size_.height()); |
161 graphics2d_ = pp::Graphics2D(instance_, pp_size, true); | 165 graphics2d_ = pp::Graphics2D(instance_, pp_size, true); |
162 bool result = instance_->BindGraphics(graphics2d_); | 166 bool result = instance_->BindGraphics(graphics2d_); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 348 |
345 // If there is a buffer queued for rendering then render it now. | 349 // If there is a buffer queued for rendering then render it now. |
346 if (merge_buffer_ != NULL) { | 350 if (merge_buffer_ != NULL) { |
347 buffer = merge_buffer_; | 351 buffer = merge_buffer_; |
348 merge_buffer_ = NULL; | 352 merge_buffer_ = NULL; |
349 FlushBuffer(merge_clip_area_, buffer, merge_region_); | 353 FlushBuffer(merge_clip_area_, buffer, merge_region_); |
350 } | 354 } |
351 } | 355 } |
352 | 356 |
353 } // namespace remoting | 357 } // namespace remoting |
OLD | NEW |