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

Side by Side Diff: remoting/host/event_executor_mac.cc

Issue 6489031: Run event executor on the ui thread to remove the need to explicitly XFlush() the XTest calls. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unused gtk dependency. Created 9 years, 10 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/host/event_executor_mac.h" 5 #include "remoting/host/event_executor_mac.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "remoting/protocol/message_decoder.h" 9 #include "remoting/protocol/message_decoder.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 using protocol::MouseEvent; 13 using protocol::MouseEvent;
14 using protocol::KeyEvent; 14 using protocol::KeyEvent;
15 15
16 EventExecutorMac::EventExecutorMac( 16 EventExecutorMac::EventExecutorMac(
17 MessageLoop* message_loop, Capturer* capturer) 17 MessageLoopForUI* message_loop, Capturer* capturer)
18 : message_loop_(message_loop), 18 : message_loop_(message_loop),
19 capturer_(capturer) { 19 capturer_(capturer) {
20 } 20 }
21 21
22 EventExecutorMac::~EventExecutorMac() { 22 EventExecutorMac::~EventExecutorMac() {
23 } 23 }
24 24
25 void EventExecutorMac::InjectKeyEvent(const KeyEvent* event, Task* done) { 25 void EventExecutorMac::InjectKeyEvent(const KeyEvent* event, Task* done) {
26 done->Run(); 26 done->Run();
27 delete done; 27 delete done;
28 } 28 }
29 29
30 void EventExecutorMac::InjectMouseEvent(const MouseEvent* event, Task* done) { 30 void EventExecutorMac::InjectMouseEvent(const MouseEvent* event, Task* done) {
31 done->Run(); 31 done->Run();
32 delete done; 32 delete done;
33 } 33 }
34 34
35 protocol::InputStub* CreateEventExecutor(MessageLoop* message_loop, 35 protocol::InputStub* CreateEventExecutor(MessageLoopForUI* message_loop,
36 Capturer* capturer) { 36 Capturer* capturer) {
37 return new EventExecutorMac(message_loop, capturer); 37 return new EventExecutorMac(message_loop, capturer);
38 } 38 }
39 39
40 } // namespace remoting 40 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698