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

Unified Diff: chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc

Issue 2384323003: Ensure that the web contents trying to access native VR Shell is the webcontents we created. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
diff --git a/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc b/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
index a4d28369835c244b23e72c509e30c09af8cd6558..5edcf5601085ad683416dc9d7bb2b79e013693e5 100644
--- a/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
+++ b/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
@@ -18,7 +18,7 @@ VrShellUIMessageHandler::VrShellUIMessageHandler() {}
VrShellUIMessageHandler::~VrShellUIMessageHandler() {}
void VrShellUIMessageHandler::RegisterMessages() {
- vr_shell_ = vr_shell::VrShell::GetWeakPtr();
+ vr_shell_ = vr_shell::VrShell::GetWeakPtr(web_ui()->GetWebContents());
web_ui()->RegisterMessageCallback(
"domLoaded", base::Bind(&VrShellUIMessageHandler::HandleDomLoaded,
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698