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

Side by Side Diff: content/renderer/render_widget.cc

Issue 8089002: Input event filtering and compositor thread setup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 if (!processed && webwidget_) 459 if (!processed && webwidget_)
460 processed = webwidget_->handleInputEvent(*input_event); 460 processed = webwidget_->handleInputEvent(*input_event);
461 } 461 }
462 462
463 // If this RawKeyDown event corresponds to a browser keyboard shortcut and 463 // If this RawKeyDown event corresponds to a browser keyboard shortcut and
464 // it's not processed by webkit, then we need to suppress the upcoming Char 464 // it's not processed by webkit, then we need to suppress the upcoming Char
465 // events. 465 // events.
466 if (!processed && is_keyboard_shortcut) 466 if (!processed && is_keyboard_shortcut)
467 suppress_next_char_events_ = true; 467 suppress_next_char_events_ = true;
468 468
469 IPC::Message* response = new ViewHostMsg_HandleInputEvent_ACK(routing_id_); 469 IPC::Message* response =
470 response->WriteInt(input_event->type); 470 new ViewHostMsg_HandleInputEvent_ACK(routing_id_, input_event->type,
471 response->WriteBool(processed); 471 processed);
472 472
473 if ((input_event->type == WebInputEvent::MouseMove || 473 if ((input_event->type == WebInputEvent::MouseMove ||
474 input_event->type == WebInputEvent::MouseWheel || 474 input_event->type == WebInputEvent::MouseWheel ||
475 input_event->type == WebInputEvent::TouchMove) && 475 input_event->type == WebInputEvent::TouchMove) &&
476 paint_aggregator_.HasPendingUpdate()) { 476 paint_aggregator_.HasPendingUpdate()) {
477 // We want to rate limit the input events in this case, so we'll wait for 477 // We want to rate limit the input events in this case, so we'll wait for
478 // painting to finish before ACKing this message. 478 // painting to finish before ACKing this message.
479 if (pending_input_event_ack_.get()) { 479 if (pending_input_event_ack_.get()) {
480 // As two different kinds of events could cause us to postpone an ack 480 // As two different kinds of events could cause us to postpone an ack
481 // we send it now, if we have one pending. The Browser should never 481 // we send it now, if we have one pending. The Browser should never
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 if (i->window == window) { 1397 if (i->window == window) {
1398 plugin_window_moves_.erase(i); 1398 plugin_window_moves_.erase(i);
1399 break; 1399 break;
1400 } 1400 }
1401 } 1401 }
1402 } 1402 }
1403 1403
1404 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1404 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1405 return false; 1405 return false;
1406 } 1406 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698