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

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

Issue 5068001: Move move classes to the remoting::protocol namespace. Minor cleanups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes for windows Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/c/pp_input_event.h" 7 #include "ppapi/c/pp_input_event.h"
8 8
9 namespace remoting { 9 namespace remoting {
10 10
11 using protocol::KeyEvent;
12 using protocol::MouseEvent;
13
11 PepperInputHandler::PepperInputHandler(ClientContext* context, 14 PepperInputHandler::PepperInputHandler(ClientContext* context,
12 protocol::ConnectionToHost* connection, 15 protocol::ConnectionToHost* connection,
13 ChromotingView* view) 16 ChromotingView* view)
14 : InputHandler(context, connection, view) { 17 : InputHandler(context, connection, view) {
15 } 18 }
16 19
17 PepperInputHandler::~PepperInputHandler() { 20 PepperInputHandler::~PepperInputHandler() {
18 } 21 }
19 22
20 void PepperInputHandler::Initialize() { 23 void PepperInputHandler::Initialize() {
(...skipping 10 matching lines...) Expand all
31 } 34 }
32 35
33 void PepperInputHandler::HandleMouseMoveEvent(const PP_InputEvent_Mouse& event) { 36 void PepperInputHandler::HandleMouseMoveEvent(const PP_InputEvent_Mouse& event) {
34 SendMouseMoveEvent(static_cast<int>(event.x), 37 SendMouseMoveEvent(static_cast<int>(event.x),
35 static_cast<int>(event.y)); 38 static_cast<int>(event.y));
36 } 39 }
37 40
38 void PepperInputHandler::HandleMouseButtonEvent( 41 void PepperInputHandler::HandleMouseButtonEvent(
39 bool button_down, 42 bool button_down,
40 const PP_InputEvent_Mouse& event) { 43 const PP_InputEvent_Mouse& event) {
41 MouseButton button = MouseButtonUndefined; 44 MouseEvent::MouseButton button = MouseEvent::BUTTON_UNDEFINED;
42 if (event.button == PP_INPUTEVENT_MOUSEBUTTON_LEFT) { 45 if (event.button == PP_INPUTEVENT_MOUSEBUTTON_LEFT) {
43 button = MouseButtonLeft; 46 button = MouseEvent::BUTTON_LEFT;
44 } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE) { 47 } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE) {
45 button = MouseButtonMiddle; 48 button = MouseEvent::BUTTON_MIDDLE;
46 } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_RIGHT) { 49 } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_RIGHT) {
47 button = MouseButtonRight; 50 button = MouseEvent::BUTTON_RIGHT;
48 } 51 }
49 52
50 if (button != MouseButtonUndefined) { 53 if (button != MouseEvent::BUTTON_UNDEFINED) {
51 SendMouseButtonEvent(button_down, button); 54 SendMouseButtonEvent(button_down, button);
52 } 55 }
53 } 56 }
54 57
55 } // namespace remoting 58 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698