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

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

Issue 10830024: Added DCHECK() to prevent webwidget_->isInputThrottled() from being called when webwidget_ is NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added parentheses for clarity Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 suppress_next_char_events_ = true; 576 suppress_next_char_events_ = true;
577 577
578 IPC::Message* response = 578 IPC::Message* response =
579 new ViewHostMsg_HandleInputEvent_ACK(routing_id_, input_event->type, 579 new ViewHostMsg_HandleInputEvent_ACK(routing_id_, input_event->type,
580 processed); 580 processed);
581 bool event_type_gets_rate_limited = 581 bool event_type_gets_rate_limited =
582 input_event->type == WebInputEvent::MouseMove || 582 input_event->type == WebInputEvent::MouseMove ||
583 input_event->type == WebInputEvent::MouseWheel || 583 input_event->type == WebInputEvent::MouseWheel ||
584 WebInputEvent::isTouchEventType(input_event->type); 584 WebInputEvent::isTouchEventType(input_event->type);
585 bool is_input_throttled = 585 bool is_input_throttled =
586 webwidget_->isInputThrottled() || 586 (webwidget_ ? webwidget_->isInputThrottled() : false) ||
587 paint_aggregator_.HasPendingUpdate(); 587 paint_aggregator_.HasPendingUpdate();
588 588
589 if (event_type_gets_rate_limited && is_input_throttled && !is_hidden_) { 589 if (event_type_gets_rate_limited && is_input_throttled && !is_hidden_) {
590 // We want to rate limit the input events in this case, so we'll wait for 590 // We want to rate limit the input events in this case, so we'll wait for
591 // painting to finish before ACKing this message. 591 // painting to finish before ACKing this message.
592 if (pending_input_event_ack_.get()) { 592 if (pending_input_event_ack_.get()) {
593 // As two different kinds of events could cause us to postpone an ack 593 // As two different kinds of events could cause us to postpone an ack
594 // we send it now, if we have one pending. The Browser should never 594 // we send it now, if we have one pending. The Browser should never
595 // send us the same kind of event we are delaying the ack for. 595 // send us the same kind of event we are delaying the ack for.
596 Send(pending_input_event_ack_.release()); 596 Send(pending_input_event_ack_.release());
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, down, scroll_far)); 1773 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, down, scroll_far));
1774 } 1774 }
1775 1775
1776 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1776 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1777 return false; 1777 return false;
1778 } 1778 }
1779 1779
1780 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1780 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1781 return false; 1781 return false;
1782 } 1782 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698