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

Unified Diff: chrome/browser/android/vr_shell/vr_input_manager.cc

Issue 2464373005: Fix VR Shell crashing when renderer crashes or native page is shown. (Closed)
Patch Set: Rebase + address comment Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_input_manager.cc
diff --git a/chrome/browser/android/vr_shell/vr_input_manager.cc b/chrome/browser/android/vr_shell/vr_input_manager.cc
index 5b54eca62c32dbd4051fafbedfa3764d288b98b4..fad21cf3b214fae4ac08c583f0b2f1a3d040f761 100644
--- a/chrome/browser/android/vr_shell/vr_input_manager.cc
+++ b/chrome/browser/android/vr_shell/vr_input_manager.cc
@@ -80,6 +80,8 @@ WebGestureEvent VrInputManager::MakeGestureEvent(WebInputEvent::Type type,
void VrInputManager::ForwardGestureEvent(
const blink::WebGestureEvent& gesture) {
+ if (!web_contents_->GetRenderWidgetHostView())
+ return;
content::RenderWidgetHost* rwh =
web_contents_->GetRenderWidgetHostView()->GetRenderWidgetHost();
if (rwh)
@@ -88,6 +90,8 @@ void VrInputManager::ForwardGestureEvent(
void VrInputManager::ForwardMouseEvent(
const blink::WebMouseEvent& mouse_event) {
+ if (!web_contents_->GetRenderWidgetHostView())
+ return;
content::RenderWidgetHost* rwh =
web_contents_->GetRenderWidgetHostView()->GetRenderWidgetHost();
if (rwh)
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698