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

Side by Side Diff: content/renderer/input/render_widget_input_handler.cc

Issue 2288313002: Return the WebViewFrameWidget in RenderWidget::webwidget() if there (Closed)
Patch Set: rename webwidget_ -> webwidget_internal_ Created 4 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/input/render_widget_input_handler.h" 5 #include "content/renderer/input/render_widget_input_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 prevent_default = 315 prevent_default =
316 prevent_default || delegate_->WillHandleGestureEvent(gesture_event); 316 prevent_default || delegate_->WillHandleGestureEvent(gesture_event);
317 } 317 }
318 318
319 WebInputEventResult processed = prevent_default 319 WebInputEventResult processed = prevent_default
320 ? WebInputEventResult::HandledSuppressed 320 ? WebInputEventResult::HandledSuppressed
321 : WebInputEventResult::NotHandled; 321 : WebInputEventResult::NotHandled;
322 if (input_event.type != WebInputEvent::Char || !suppress_next_char_events_) { 322 if (input_event.type != WebInputEvent::Char || !suppress_next_char_events_) {
323 suppress_next_char_events_ = false; 323 suppress_next_char_events_ = false;
324 if (processed == WebInputEventResult::NotHandled && widget_->webwidget()) 324 if (processed == WebInputEventResult::NotHandled && widget_->GetWebWidget())
325 processed = widget_->webwidget()->handleInputEvent(input_event); 325 processed = widget_->GetWebWidget()->handleInputEvent(input_event);
326 } 326 }
327 327
328 // TODO(dtapuska): Use the input_event.timeStampSeconds as the start 328 // TODO(dtapuska): Use the input_event.timeStampSeconds as the start
329 // ideally this should be when the event was sent by the compositor to the 329 // ideally this should be when the event was sent by the compositor to the
330 // renderer. crbug.com/565348 330 // renderer. crbug.com/565348
331 if (input_event.type == WebInputEvent::TouchStart || 331 if (input_event.type == WebInputEvent::TouchStart ||
332 input_event.type == WebInputEvent::TouchMove || 332 input_event.type == WebInputEvent::TouchMove ||
333 input_event.type == WebInputEvent::TouchEnd) { 333 input_event.type == WebInputEvent::TouchEnd) {
334 const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(input_event); 334 const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(input_event);
335 335
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 if (pending_input_event_ack_) { 550 if (pending_input_event_ack_) {
551 TRACE_EVENT_ASYNC_END0("input", 551 TRACE_EVENT_ASYNC_END0("input",
552 "RenderWidgetInputHandler::ThrottledInputEventAck", 552 "RenderWidgetInputHandler::ThrottledInputEventAck",
553 pending_input_event_ack_.get()); 553 pending_input_event_ack_.get());
554 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); 554 delegate_->OnInputEventAck(std::move(pending_input_event_ack_));
555 } 555 }
556 total_input_handling_time_this_frame_ = base::TimeDelta(); 556 total_input_handling_time_this_frame_ = base::TimeDelta();
557 } 557 }
558 558
559 } // namespace content 559 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/external_popup_menu_browsertest.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698