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

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

Issue 2876023002: Use VrTabHelper to disable popups
Patch Set: Created 3 years, 7 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_tab_helper.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_tab_helper.cc
diff --git a/chrome/browser/android/vr_shell/vr_tab_helper.cc b/chrome/browser/android/vr_shell/vr_tab_helper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..079b5bd8046048fe5ec5485aa8a1fd55b779a9d9
--- /dev/null
+++ b/chrome/browser/android/vr_shell/vr_tab_helper.cc
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/vr_shell/vr_tab_helper.h"
+
+#include "chrome/browser/android/vr_shell/vr_shell_delegate.h"
+#include "device/vr/android/gvr/gvr_delegate_provider.h"
+
+DEFINE_WEB_CONTENTS_USER_DATA_KEY(vr_shell::VrTabHelper);
+
+namespace vr_shell {
+
+VrTabHelper::VrTabHelper(content::WebContents* contents)
+ : content::WebContentsObserver(contents) {}
+VrTabHelper::~VrTabHelper() {}
+
+bool VrTabHelper::HandleJavaScriptDialog() {
+ return is_in_vr_;
+}
+
+bool VrTabHelper::HandleMediaPermission() {
+ return is_in_vr_;
+}
+
+bool VrTabHelper::HandleFileChooser() {
+ return is_in_vr_;
+}
+
+bool VrTabHelper::HandleBluetoothChooser() {
+ return is_in_vr_;
+}
+
+} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/vr_tab_helper.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698