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

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

Issue 6594138: Block event processing on host/client until the client has authenticated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing source files Created 9 years, 9 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
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
(...skipping 15 matching lines...) Expand all
26 void PepperInputHandler::HandleKeyEvent(bool keydown, 26 void PepperInputHandler::HandleKeyEvent(bool keydown,
27 const PP_InputEvent_Key& event) { 27 const PP_InputEvent_Key& event) {
28 SendKeyEvent(keydown, event.key_code); 28 SendKeyEvent(keydown, event.key_code);
29 } 29 }
30 30
31 void PepperInputHandler::HandleCharacterEvent( 31 void PepperInputHandler::HandleCharacterEvent(
32 const PP_InputEvent_Character& event) { 32 const PP_InputEvent_Character& event) {
33 // TODO(garykac): Coordinate key and char events. 33 // TODO(garykac): Coordinate key and char events.
34 } 34 }
35 35
36 void PepperInputHandler::HandleMouseMoveEvent(const PP_InputEvent_Mouse& event) { 36 void PepperInputHandler::HandleMouseMoveEvent(
37 const PP_InputEvent_Mouse& event) {
37 SendMouseMoveEvent(static_cast<int>(event.x), 38 SendMouseMoveEvent(static_cast<int>(event.x),
38 static_cast<int>(event.y)); 39 static_cast<int>(event.y));
39 } 40 }
40 41
41 void PepperInputHandler::HandleMouseButtonEvent( 42 void PepperInputHandler::HandleMouseButtonEvent(
42 bool button_down, 43 bool button_down,
43 const PP_InputEvent_Mouse& event) { 44 const PP_InputEvent_Mouse& event) {
44 MouseEvent::MouseButton button = MouseEvent::BUTTON_UNDEFINED; 45 MouseEvent::MouseButton button = MouseEvent::BUTTON_UNDEFINED;
45 if (event.button == PP_INPUTEVENT_MOUSEBUTTON_LEFT) { 46 if (event.button == PP_INPUTEVENT_MOUSEBUTTON_LEFT) {
46 button = MouseEvent::BUTTON_LEFT; 47 button = MouseEvent::BUTTON_LEFT;
47 } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE) { 48 } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE) {
48 button = MouseEvent::BUTTON_MIDDLE; 49 button = MouseEvent::BUTTON_MIDDLE;
49 } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_RIGHT) { 50 } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_RIGHT) {
50 button = MouseEvent::BUTTON_RIGHT; 51 button = MouseEvent::BUTTON_RIGHT;
51 } 52 }
52 53
53 if (button != MouseEvent::BUTTON_UNDEFINED) { 54 if (button != MouseEvent::BUTTON_UNDEFINED) {
54 SendMouseButtonEvent(button_down, button); 55 SendMouseButtonEvent(button_down, button);
55 } 56 }
56 } 57 }
57 58
58 } // namespace remoting 59 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698