diff options
author | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 10:25:53 +0000 |
---|---|---|
committer | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 10:25:53 +0000 |
commit | 73a822fc4edecfd7995319f791f0fdd2fe60da60 (patch) | |
tree | ba9da5ad28528835015e5ec810110fdd6fc48ad2 /remoting/client/plugin/pepper_input_handler.cc | |
parent | 55cb9d5693f8b8e9ebac337d55c2dcab4cd27dd0 (diff) | |
download | chromium_src-73a822fc4edecfd7995319f791f0fdd2fe60da60.zip chromium_src-73a822fc4edecfd7995319f791f0fdd2fe60da60.tar.gz chromium_src-73a822fc4edecfd7995319f791f0fdd2fe60da60.tar.bz2 |
If the user selects scale-to-fit, then PepperView starts
maintaining and displaying a scaled copy of its pixel backing
store.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6811043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin/pepper_input_handler.cc')
-rw-r--r-- | remoting/client/plugin/pepper_input_handler.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc index 16a5738..452668e 100644 --- a/remoting/client/plugin/pepper_input_handler.cc +++ b/remoting/client/plugin/pepper_input_handler.cc @@ -1,10 +1,12 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "remoting/client/plugin/pepper_input_handler.h" #include "ppapi/c/pp_input_event.h" +#include "remoting/client/chromoting_view.h" +#include "ui/gfx/point.h" namespace remoting { @@ -35,8 +37,11 @@ void PepperInputHandler::HandleCharacterEvent( void PepperInputHandler::HandleMouseMoveEvent( const PP_InputEvent_Mouse& event) { - SendMouseMoveEvent(static_cast<int>(event.x), - static_cast<int>(event.y)); + gfx::Point p(static_cast<int>(event.x), static_cast<int>(event.y)); + // Pepper gives co-ordinates in the plugin instance's co-ordinate system, + // which may be different from the host desktop's co-ordinate system. + p = view_->ConvertScreenToHost(p); + SendMouseMoveEvent(p.x(), p.y()); } void PepperInputHandler::HandleMouseButtonEvent( |