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

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

Issue 2874623004: [vr] Introduce VrTabHelper (Closed)
Patch Set: nogncheck (thanks sadrul@, sky@)! 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..eef1ffbc6e79e53eb91c1df581f4c4e7020a3b5b
--- /dev/null
+++ b/chrome/browser/android/vr_shell/vr_tab_helper.cc
@@ -0,0 +1,27 @@
+// 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) {}
+VrTabHelper::~VrTabHelper() {}
+
+void VrTabHelper::SetIsInVr(bool is_in_vr) {
+ is_in_vr_ = is_in_vr;
+}
+
+/* static */
+bool VrTabHelper::IsInVr(content::WebContents* contents) {
+ VrTabHelper* vr_tab_helper = VrTabHelper::FromWebContents(contents);
+ return vr_tab_helper->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