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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/android/vr_shell/vr_tab_helper.h"
6
7 #include "chrome/browser/android/vr_shell/vr_shell_delegate.h"
8 #include "device/vr/android/gvr/gvr_delegate_provider.h"
9
10 DEFINE_WEB_CONTENTS_USER_DATA_KEY(vr_shell::VrTabHelper);
11
12 namespace vr_shell {
13
14 VrTabHelper::VrTabHelper(content::WebContents* contents) {}
15 VrTabHelper::~VrTabHelper() {}
16
17 void VrTabHelper::SetIsInVr(bool is_in_vr) {
18 is_in_vr_ = is_in_vr;
19 }
20
21 /* static */
22 bool VrTabHelper::IsInVr(content::WebContents* contents) {
23 VrTabHelper* vr_tab_helper = VrTabHelper::FromWebContents(contents);
24 return vr_tab_helper->is_in_vr();
25 }
26
27 } // namespace vr_shell
OLDNEW
« 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