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

Side by Side Diff: chrome/browser/vr/vr_tab_helper.h

Issue 2975593002: [vr] Deny permission requests in VR mode
Patch Set: . Created 3 years, 5 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/ui/tab_helpers.cc ('k') | chrome/browser/vr/vr_tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_VR_VR_TAB_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_TAB_HELPER_H_ 6 #define CHROME_BROWSER_VR_VR_TAB_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/browser/web_contents_user_data.h" 9 #include "content/public/browser/web_contents_user_data.h"
10 10
11 namespace vr_shell { 11 namespace vr {
12 12
13 class VrTabHelper : public content::WebContentsUserData<VrTabHelper> { 13 class VrTabHelper : public content::WebContentsUserData<VrTabHelper> {
14 public: 14 public:
15 ~VrTabHelper() override; 15 ~VrTabHelper() override;
16 16
17 bool is_in_vr() const { return is_in_vr_; } 17 bool is_in_vr() const { return is_in_vr_; }
18 18
19 // Called by VrShell when we enter and exit vr mode. It finds us by looking us 19 // Called by VrShell when we enter and exit vr mode. It finds us by looking us
20 // up on the WebContents. 20 // up on the WebContents.
21 void SetIsInVr(bool is_in_vr); 21 void SetIsInVr(bool is_in_vr);
22 22
23 static bool IsInVr(content::WebContents* contents); 23 static bool IsInVr(content::WebContents* contents);
24 24
25 private: 25 private:
26 explicit VrTabHelper(content::WebContents* contents); 26 explicit VrTabHelper(content::WebContents* contents);
27 27
28 friend class content::WebContentsUserData<VrTabHelper>; 28 friend class content::WebContentsUserData<VrTabHelper>;
29 29
30 content::WebContents* web_contents_; 30 content::WebContents* web_contents_;
31 bool is_in_vr_ = false; 31 bool is_in_vr_ = false;
32 32
33 DISALLOW_COPY_AND_ASSIGN(VrTabHelper); 33 DISALLOW_COPY_AND_ASSIGN(VrTabHelper);
34 }; 34 };
35 35
36 } // namespace vr_shell 36 } // namespace vr
37 37
38 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_TAB_HELPER_H_ 38 #endif // CHROME_BROWSER_VR_VR_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_helpers.cc ('k') | chrome/browser/vr/vr_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698