summaryrefslogtreecommitdiffstats
path: root/remoting/client
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-02 20:23:35 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-02 20:23:35 +0000
commit2c22968fe57ea2f1e6a4e4d1fdca3c38d3dc483c (patch)
treee7f154f5f3fb1a27144bee9881e5f4c2a1fd30a9 /remoting/client
parent1a6e72c054869c988f224e68a45d4a580d596be8 (diff)
downloadchromium_src-2c22968fe57ea2f1e6a4e4d1fdca3c38d3dc483c.zip
chromium_src-2c22968fe57ea2f1e6a4e4d1fdca3c38d3dc483c.tar.gz
chromium_src-2c22968fe57ea2f1e6a4e4d1fdca3c38d3dc483c.tar.bz2
Move move classes to the remoting::protocol namespace. Minor cleanups.
BUG=None TEST=compiles, unittests Review URL: http://codereview.chromium.org/5068001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r--remoting/client/input_handler.cc5
-rw-r--r--remoting/client/input_handler.h3
-rw-r--r--remoting/client/plugin/pepper_input_handler.cc13
-rw-r--r--remoting/client/x11_input_handler.cc13
4 files changed, 22 insertions, 12 deletions
diff --git a/remoting/client/input_handler.cc b/remoting/client/input_handler.cc
index 7048e73..68c29f8 100644
--- a/remoting/client/input_handler.cc
+++ b/remoting/client/input_handler.cc
@@ -10,6 +10,9 @@
namespace remoting {
+using protocol::KeyEvent;
+using protocol::MouseEvent;
+
InputHandler::InputHandler(ClientContext* context,
protocol::ConnectionToHost* connection,
ChromotingView* view)
@@ -41,7 +44,7 @@ void InputHandler::SendMouseMoveEvent(int x, int y) {
}
void InputHandler::SendMouseButtonEvent(bool button_down,
- MouseButton button) {
+ MouseEvent::MouseButton button) {
protocol::InputStub* stub = connection_->input_stub();
if (stub) {
MouseEvent* event = new MouseEvent();
diff --git a/remoting/client/input_handler.h b/remoting/client/input_handler.h
index 8d7c86d..f3f647e 100644
--- a/remoting/client/input_handler.h
+++ b/remoting/client/input_handler.h
@@ -30,7 +30,8 @@ class InputHandler {
protected:
void SendKeyEvent(bool press, int keycode);
void SendMouseMoveEvent(int x, int y);
- void SendMouseButtonEvent(bool down, MouseButton button);
+ void SendMouseButtonEvent(bool down,
+ protocol::MouseEvent::MouseButton button);
ClientContext* context_;
protocol::ConnectionToHost* connection_;
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc
index 3c4f00a..81ace4e 100644
--- a/remoting/client/plugin/pepper_input_handler.cc
+++ b/remoting/client/plugin/pepper_input_handler.cc
@@ -8,6 +8,9 @@
namespace remoting {
+using protocol::KeyEvent;
+using protocol::MouseEvent;
+
PepperInputHandler::PepperInputHandler(ClientContext* context,
protocol::ConnectionToHost* connection,
ChromotingView* view)
@@ -38,16 +41,16 @@ void PepperInputHandler::HandleMouseMoveEvent(const PP_InputEvent_Mouse& event)
void PepperInputHandler::HandleMouseButtonEvent(
bool button_down,
const PP_InputEvent_Mouse& event) {
- MouseButton button = MouseButtonUndefined;
+ MouseEvent::MouseButton button = MouseEvent::BUTTON_UNDEFINED;
if (event.button == PP_INPUTEVENT_MOUSEBUTTON_LEFT) {
- button = MouseButtonLeft;
+ button = MouseEvent::BUTTON_LEFT;
} else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE) {
- button = MouseButtonMiddle;
+ button = MouseEvent::BUTTON_MIDDLE;
} else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_RIGHT) {
- button = MouseButtonRight;
+ button = MouseEvent::BUTTON_RIGHT;
}
- if (button != MouseButtonUndefined) {
+ if (button != MouseEvent::BUTTON_UNDEFINED) {
SendMouseButtonEvent(button_down, button);
}
}
diff --git a/remoting/client/x11_input_handler.cc b/remoting/client/x11_input_handler.cc
index 4c3d142..b7ee8df 100644
--- a/remoting/client/x11_input_handler.cc
+++ b/remoting/client/x11_input_handler.cc
@@ -16,6 +16,9 @@
namespace remoting {
+using protocol::KeyEvent;
+using protocol::MouseEvent;
+
X11InputHandler::X11InputHandler(ClientContext* context,
protocol::ConnectionToHost* connection,
ChromotingView* view)
@@ -88,16 +91,16 @@ void X11InputHandler::HandleMouseMoveEvent(int x, int y) {
}
void X11InputHandler::HandleMouseButtonEvent(bool button_down, int xbutton_id) {
- MouseButton button = MouseButtonUndefined;
+ MouseEvent::MouseButton button = MouseEvent::BUTTON_UNDEFINED;
if (xbutton_id == 1) {
- button = MouseButtonLeft;
+ button = MouseEvent::BUTTON_LEFT;
} else if (xbutton_id == 2) {
- button = MouseButtonMiddle;
+ button = MouseEvent::BUTTON_MIDDLE;
} else if (xbutton_id == 3) {
- button = MouseButtonRight;
+ button = MouseEvent::BUTTON_RIGHT;
}
- if (button != MouseButtonUndefined) {
+ if (button != MouseEvent::BUTTON_UNDEFINED) {
SendMouseButtonEvent(button_down, button);
}
}