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

Unified Diff: remoting/host/event_executor_win.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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/event_executor_win.cc
diff --git a/remoting/host/event_executor_win.cc b/remoting/host/event_executor_win.cc
index f79d9ebd6479b8a058427a50b3daef8e61c18057..1fe3beb2c032f5a0440c1287aee7b43193cfce5d 100644
--- a/remoting/host/event_executor_win.cc
+++ b/remoting/host/event_executor_win.cc
@@ -14,6 +14,9 @@
namespace remoting {
+using protocol::MouseEvent;
+using protocol::KeyEvent;
+
EventExecutorWin::EventExecutorWin(
MessageLoop* message_loop, Capturer* capturer)
: message_loop_(message_loop),
@@ -36,8 +39,7 @@ void EventExecutorWin::InjectKeyEvent(const KeyEvent* event, Task* done) {
delete done;
}
-void EventExecutorWin::InjectMouseEvent(const MouseEvent* event,
- Task* done) {
+void EventExecutorWin::InjectMouseEvent(const MouseEvent* event, Task* done) {
if (MessageLoop::current() != message_loop_) {
message_loop_->PostTask(
FROM_HERE,
@@ -126,15 +128,15 @@ void EventExecutorWin::HandleMouse(const MouseEvent* event) {
button_event.mi.dx = 0;
button_event.mi.dy = 0;
- MouseButton button = event->button();
+ MouseEvent::MouseButton button = event->button();
bool down = event->button_down();
- if (button == MouseButtonLeft) {
+ if (button == MouseEvent::BUTTON_LEFT) {
button_event.mi.dwFlags =
down ? MOUSEEVENTF_LEFTDOWN : MOUSEEVENTF_LEFTUP;
- } else if (button == MouseButtonMiddle) {
+ } else if (button == MouseEvent::BUTTON_MIDDLE) {
button_event.mi.dwFlags =
down ? MOUSEEVENTF_MIDDLEDOWN : MOUSEEVENTF_MIDDLEUP;
- } else if (button == MouseButtonRight) {
+ } else if (button == MouseEvent::BUTTON_RIGHT) {
button_event.mi.dwFlags =
down ? MOUSEEVENTF_RIGHTDOWN : MOUSEEVENTF_RIGHTUP;
} else {

Powered by Google App Engine
This is Rietveld 408576698