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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 7992011: Move us fully from gfx:: over to skia types for consistency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for bad DEPS Created 9 years, 2 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
« no previous file with comments | « remoting/client/frame_consumer.h ('k') | remoting/client/plugin/pepper_input_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 input_handler_.reset(); 204 input_handler_.reset();
205 host_connection_.reset(); 205 host_connection_.reset();
206 206
207 GetScriptableObject()->SetConnectionInfo(STATUS_CLOSED, QUALITY_UNKNOWN); 207 GetScriptableObject()->SetConnectionInfo(STATUS_CLOSED, QUALITY_UNKNOWN);
208 } 208 }
209 209
210 void ChromotingInstance::DidChangeView(const pp::Rect& position, 210 void ChromotingInstance::DidChangeView(const pp::Rect& position,
211 const pp::Rect& clip) { 211 const pp::Rect& clip) {
212 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); 212 DCHECK(plugin_message_loop_->BelongsToCurrentThread());
213 213
214 view_->SetPluginSize(gfx::Size(position.width(), position.height())); 214 view_->SetPluginSize(SkISize::Make(position.width(), position.height()));
215 215
216 // TODO(wez): Pass the dimensions of the plugin to the RectangleDecoder 216 // TODO(wez): Pass the dimensions of the plugin to the RectangleDecoder
217 // and let it generate the necessary refresh events. 217 // and let it generate the necessary refresh events.
218 // If scale-to-fit is enabled then update the scaling ratios. 218 // If scale-to-fit is enabled then update the scaling ratios.
219 // We also force a full-frame refresh, in case the ratios changed. 219 // We also force a full-frame refresh, in case the ratios changed.
220 if (scale_to_fit_) { 220 if (scale_to_fit_) {
221 rectangle_decoder_->SetScaleRatios(view_->GetHorizontalScaleRatio(), 221 rectangle_decoder_->SetScaleRatios(view_->GetHorizontalScaleRatio(),
222 view_->GetVerticalScaleRatio()); 222 view_->GetVerticalScaleRatio());
223 rectangle_decoder_->RefreshFullFrame(); 223 rectangle_decoder_->RefreshFullFrame();
224 } 224 }
225 225
226 // Notify the RectangleDecoder of the new clip rect. 226 // Notify the RectangleDecoder of the new clip rect.
227 rectangle_decoder_->UpdateClipRect( 227 rectangle_decoder_->UpdateClipRect(
228 gfx::Rect(clip.x(), clip.y(), clip.width(), clip.height())); 228 SkIRect::MakeXYWH(clip.x(), clip.y(), clip.width(), clip.height()));
229 } 229 }
230 230
231 bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) { 231 bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) {
232 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); 232 DCHECK(plugin_message_loop_->BelongsToCurrentThread());
233 if (!input_handler_.get()) { 233 if (!input_handler_.get()) {
234 return false; 234 return false;
235 } 235 }
236 236
237 PepperInputHandler* pih 237 PepperInputHandler* pih
238 = static_cast<PepperInputHandler*>(input_handler_.get()); 238 = static_cast<PepperInputHandler*>(input_handler_.get());
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 initial_policy_received_ = true; 517 initial_policy_received_ = true;
518 enable_client_nat_traversal_ = traversal_policy; 518 enable_client_nat_traversal_ = traversal_policy;
519 519
520 if (!delayed_connect_.is_null()) { 520 if (!delayed_connect_.is_null()) {
521 thread_proxy_->PostTask(FROM_HERE, delayed_connect_); 521 thread_proxy_->PostTask(FROM_HERE, delayed_connect_);
522 delayed_connect_.Reset(); 522 delayed_connect_.Reset();
523 } 523 }
524 } 524 }
525 525
526 } // namespace remoting 526 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/frame_consumer.h ('k') | remoting/client/plugin/pepper_input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698