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

Side by Side Diff: remoting/client/plugin/pepper_input_handler.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/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_view.h » ('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/pepper_input_handler.h" 5 #include "remoting/client/plugin/pepper_input_handler.h"
6 6
7 #include "ppapi/cpp/input_event.h" 7 #include "ppapi/cpp/input_event.h"
8 #include "ppapi/cpp/point.h" 8 #include "ppapi/cpp/point.h"
9 #include "remoting/client/plugin/pepper_view_proxy.h" 9 #include "remoting/client/plugin/pepper_view_proxy.h"
10 10
(...skipping 22 matching lines...) Expand all
33 SendKeyEvent(keydown, event.GetKeyCode()); 33 SendKeyEvent(keydown, event.GetKeyCode());
34 } 34 }
35 35
36 void PepperInputHandler::HandleCharacterEvent( 36 void PepperInputHandler::HandleCharacterEvent(
37 const pp::KeyboardInputEvent& event) { 37 const pp::KeyboardInputEvent& event) {
38 // TODO(garykac): Coordinate key and char events. 38 // TODO(garykac): Coordinate key and char events.
39 } 39 }
40 40
41 void PepperInputHandler::HandleMouseMoveEvent( 41 void PepperInputHandler::HandleMouseMoveEvent(
42 const pp::MouseInputEvent& event) { 42 const pp::MouseInputEvent& event) {
43 gfx::Point p(event.GetPosition().x(), event.GetPosition().y()); 43 SkIPoint p(SkIPoint::Make(event.GetPosition().x(), event.GetPosition().y()));
44 // Pepper gives co-ordinates in the plugin instance's co-ordinate system, 44 // Pepper gives co-ordinates in the plugin instance's co-ordinate system,
45 // which may be different from the host desktop's co-ordinate system. 45 // which may be different from the host desktop's co-ordinate system.
46 double horizontal_ratio = view_->GetHorizontalScaleRatio(); 46 double horizontal_ratio = view_->GetHorizontalScaleRatio();
47 double vertical_ratio = view_->GetVerticalScaleRatio(); 47 double vertical_ratio = view_->GetVerticalScaleRatio();
48 48
49 if (horizontal_ratio == 0.0) 49 if (horizontal_ratio == 0.0)
50 horizontal_ratio = 1.0; 50 horizontal_ratio = 1.0;
51 if (vertical_ratio == 0.0) 51 if (vertical_ratio == 0.0)
52 vertical_ratio = 1.0; 52 vertical_ratio = 1.0;
53 53
(...skipping 18 matching lines...) Expand all
72 // Leave button undefined. 72 // Leave button undefined.
73 break; 73 break;
74 } 74 }
75 75
76 if (button != MouseEvent::BUTTON_UNDEFINED) { 76 if (button != MouseEvent::BUTTON_UNDEFINED) {
77 SendMouseButtonEvent(button_down, button); 77 SendMouseButtonEvent(button_down, button);
78 } 78 }
79 } 79 }
80 80
81 } // namespace remoting 81 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698