| OLD | NEW |
| (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 |
| OLD | NEW |