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

Side by Side Diff: chrome/browser/android/vr_shell/vr_tab_helper.h

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
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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_TAB_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_TAB_HELPER_H_
7
8 #include "base/macros.h"
9 #include "content/public/browser/web_contents_user_data.h"
10
11 namespace vr_shell {
12
13 class VrTabHelper : public content::WebContentsUserData<VrTabHelper> {
14 public:
15 ~VrTabHelper() override;
16
17 bool is_in_vr() const { return is_in_vr_; }
18
19 // Called by VrShell when we enter and exit vr mode. It finds us by looking us
20 // up on the WebContents. Eventually, we will also set a number of flags here
21 // as we enter and exit vr mode (see TODO below).
22 void SetIsInVr(bool is_in_vr);
23
24 static bool IsInVr(content::WebContents* contents);
25
26 private:
27 friend class content::WebContentsUserData<VrTabHelper>;
28
29 explicit VrTabHelper(content::WebContents* contents);
30
31 // TODO(asimjour): once we have per-dialog flags for disabling specific
32 // content-related popups, we should hang onto a pointer to the web contents
33 // and set those flags as we enter and exit vr mode.
34 bool is_in_vr_ = false;
35
36 DISALLOW_COPY_AND_ASSIGN(VrTabHelper);
37 };
38
39 } // namespace vr_shell
40
41 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | chrome/browser/android/vr_shell/vr_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698