Commit 7ebceb99 authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Use static_cast instead of reinterpret_cast for downcasting

static_cast is better suited for downcasting since it can check that the
types are related.

/components/plugins
This CL was uploaded by git cl split.

R=tommycli@chromium.org

Change-Id: Ic82fae77b2f270d0b10e9354d903498d7c33117a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435331
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811722}
parent 037591fe
...@@ -223,7 +223,7 @@ blink::WebInputEventResult WebViewPlugin::HandleInputEvent( ...@@ -223,7 +223,7 @@ blink::WebInputEventResult WebViewPlugin::HandleInputEvent(
if (event.GetType() == blink::WebInputEvent::Type::kContextMenu) { if (event.GetType() == blink::WebInputEvent::Type::kContextMenu) {
if (delegate_) { if (delegate_) {
const WebMouseEvent& mouse_event = const WebMouseEvent& mouse_event =
reinterpret_cast<const WebMouseEvent&>(event); static_cast<const WebMouseEvent&>(event);
delegate_->ShowContextMenu(mouse_event); delegate_->ShowContextMenu(mouse_event);
} }
return blink::WebInputEventResult::kHandledSuppressed; return blink::WebInputEventResult::kHandledSuppressed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment