| OLD | NEW |
| 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/x11_input_handler.h" | 5 #include "remoting/client/x11_input_handler.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "remoting/client/client_context.h" | 8 #include "remoting/client/client_context.h" |
| 9 #include "remoting/client/x11_view.h" | 9 #include "remoting/client/x11_view.h" |
| 10 #include "remoting/jingle_glue/jingle_thread.h" | 10 #include "remoting/jingle_glue/jingle_thread.h" |
| 11 | 11 |
| 12 // Include Xlib at the end because it clashes with Status in | 12 // Include Xlib at the end because it clashes with ClientMessage defined in |
| 13 // base/tracked_objects.h. | 13 // the protocol buffer. |
| 14 #include <X11/Xlib.h> | 14 #include <X11/Xlib.h> |
| 15 | 15 |
| 16 namespace remoting { | 16 namespace remoting { |
| 17 | 17 |
| 18 X11InputHandler::X11InputHandler(ClientContext* context, | 18 X11InputHandler::X11InputHandler(ClientContext* context, |
| 19 ChromotingView* view) | 19 ChromotingView* view) |
| 20 : context_(context), | 20 : context_(context), |
| 21 view_(view) { | 21 view_(view) { |
| 22 } | 22 } |
| 23 | 23 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 53 void X11InputHandler::ScheduleX11EventHandler() { | 53 void X11InputHandler::ScheduleX11EventHandler() { |
| 54 // Schedule a delayed task to process X11 events in 10ms. | 54 // Schedule a delayed task to process X11 events in 10ms. |
| 55 static const int kProcessEventsInterval = 10; | 55 static const int kProcessEventsInterval = 10; |
| 56 context_->jingle_thread()->message_loop()->PostDelayedTask( | 56 context_->jingle_thread()->message_loop()->PostDelayedTask( |
| 57 FROM_HERE, | 57 FROM_HERE, |
| 58 NewRunnableMethod(this, &X11InputHandler::DoProcessX11Events), | 58 NewRunnableMethod(this, &X11InputHandler::DoProcessX11Events), |
| 59 kProcessEventsInterval); | 59 kProcessEventsInterval); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace remoting | 62 } // namespace remoting |
| OLD | NEW |