| Index: content/renderer/gpu/input_event_filter.cc
|
| diff --git a/content/renderer/gpu/input_event_filter.cc b/content/renderer/gpu/input_event_filter.cc
|
| index 96a7034af160537f5c18054574e561c4d8094552..29a7621b13e6b065c6017a5b118ac5c1982b70ac 100644
|
| --- a/content/renderer/gpu/input_event_filter.cc
|
| +++ b/content/renderer/gpu/input_event_filter.cc
|
| @@ -6,13 +6,30 @@
|
| #include "base/debug/trace_event.h"
|
| #include "base/location.h"
|
| #include "base/message_loop_proxy.h"
|
| +#include "content/common/child_thread.h"
|
| #include "content/common/input_messages.h"
|
| #include "content/renderer/gpu/input_event_filter.h"
|
| +#include "ipc/ipc_sync_channel.h"
|
| +
|
| +#if defined(OS_ANDROID)
|
| +// TODO(epenner): Move thread priorities to base. (crbug.com/170549)
|
| +#include <sys/resource.h>
|
| +#endif
|
|
|
| using WebKit::WebInputEvent;
|
|
|
| namespace content {
|
|
|
| +#if defined(OS_ANDROID)
|
| +// TODO(epenner): Move thread priorities to base. (crbug.com/170549)
|
| +namespace {
|
| +void SetHighThreadPriority() {
|
| + int nice_value = -6; // High priority.
|
| + setpriority(PRIO_PROCESS, base::PlatformThread::CurrentId(), nice_value);
|
| +}
|
| +}
|
| +#endif
|
| +
|
| InputEventFilter::InputEventFilter(
|
| IPC::Listener* main_listener,
|
| const scoped_refptr<base::MessageLoopProxy>& target_loop,
|
| @@ -24,14 +41,18 @@ InputEventFilter::InputEventFilter(
|
| handler_(handler) {
|
| DCHECK(target_loop_);
|
| DCHECK(!handler_.is_null());
|
| +#if defined(OS_ANDROID)
|
| +// TODO(epenner): Move thread priorities to base. (crbug.com/170549)
|
| + target_loop->PostTask(FROM_HERE, base::Bind(&SetHighThreadPriority));
|
| +#endif
|
| }
|
|
|
| -void InputEventFilter::AddRoute(int routing_id) {
|
| +void InputEventFilter::DidAddInputHandler(int routing_id) {
|
| base::AutoLock locked(routes_lock_);
|
| routes_.insert(routing_id);
|
| }
|
|
|
| -void InputEventFilter::RemoveRoute(int routing_id) {
|
| +void InputEventFilter::DidRemoveInputHandler(int routing_id) {
|
| base::AutoLock locked(routes_lock_);
|
| routes_.erase(routing_id);
|
| }
|
|
|