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

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

Issue 2902043005: [vr] Add incognito coloring (Closed)
Patch Set: . 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_UI_SCENE_MANAGER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/android/vr_shell/color_scheme.h"
12 #include "chrome/browser/android/vr_shell/ui_interface.h" 13 #include "chrome/browser/android/vr_shell/ui_interface.h"
13 #include "device/vr/vr_types.h" 14 #include "device/vr/vr_types.h"
14 15
15 namespace vr_shell { 16 namespace vr_shell {
16 17
17 class LoadingIndicator; 18 class LoadingIndicator;
18 class UiElement; 19 class UiElement;
19 class UiScene; 20 class UiScene;
20 class UrlBar; 21 class UrlBar;
21 class VrBrowserInterface; 22 class VrBrowserInterface;
22 23
23 struct ColorScheme;
24
25 class UiSceneManager { 24 class UiSceneManager {
26 public: 25 public:
27 UiSceneManager(VrBrowserInterface* browser, 26 UiSceneManager(VrBrowserInterface* browser,
28 UiScene* scene, 27 UiScene* scene,
29 bool in_cct, 28 bool in_cct,
30 bool in_web_vr); 29 bool in_web_vr);
31 ~UiSceneManager(); 30 ~UiSceneManager();
32 31
33 base::WeakPtr<UiSceneManager> GetWeakPtr(); 32 base::WeakPtr<UiSceneManager> GetWeakPtr();
34 33
35 void SetFullscreen(bool fullscreen); 34 void SetFullscreen(bool fullscreen);
35 void SetIncognito(bool incognito);
36 void SetURL(const GURL& gurl); 36 void SetURL(const GURL& gurl);
37 void SetWebVrSecureOrigin(bool secure); 37 void SetWebVrSecureOrigin(bool secure);
38 void SetWebVrMode(bool web_vr); 38 void SetWebVrMode(bool web_vr);
39 void SetSecurityLevel(security_state::SecurityLevel level); 39 void SetSecurityLevel(security_state::SecurityLevel level);
40 void SetLoading(bool loading); 40 void SetLoading(bool loading);
41 void SetLoadProgress(float progress); 41 void SetLoadProgress(float progress);
42 void SetIsExiting(); 42 void SetIsExiting();
43 void SetVideoCapturingIndicator(bool enabled); 43 void SetVideoCapturingIndicator(bool enabled);
44 void SetScreenCapturingIndicator(bool enabled); 44 void SetScreenCapturingIndicator(bool enabled);
45 void SetAudioCapturingIndicator(bool enabled); 45 void SetAudioCapturingIndicator(bool enabled);
(...skipping 14 matching lines...) Expand all
60 void CreateCloseButton(); 60 void CreateCloseButton();
61 void CreateExitWarning(); 61 void CreateExitWarning();
62 62
63 void ConfigureScene(); 63 void ConfigureScene();
64 void ConfigureSecurityWarnings(); 64 void ConfigureSecurityWarnings();
65 void UpdateBackgroundColor(); 65 void UpdateBackgroundColor();
66 void OnSecurityWarningTimer(); 66 void OnSecurityWarningTimer();
67 void OnBackButtonClicked(); 67 void OnBackButtonClicked();
68 void OnCloseButtonClicked(); 68 void OnCloseButtonClicked();
69 int AllocateId(); 69 int AllocateId();
70 ColorScheme::Mode mode() const;
70 const ColorScheme& color_scheme() const; 71 const ColorScheme& color_scheme() const;
71 72
72 VrBrowserInterface* browser_; 73 VrBrowserInterface* browser_;
73 UiScene* scene_; 74 UiScene* scene_;
74 75
75 // UI element pointers (not owned by the scene manager). 76 // UI element pointers (not owned by the scene manager).
76 UiElement* permanent_security_warning_ = nullptr; 77 UiElement* permanent_security_warning_ = nullptr;
77 UiElement* transient_security_warning_ = nullptr; 78 UiElement* transient_security_warning_ = nullptr;
78 UiElement* exit_warning_ = nullptr; 79 UiElement* exit_warning_ = nullptr;
79 UiElement* main_content_ = nullptr; 80 UiElement* main_content_ = nullptr;
80 UiElement* audio_capture_indicator_ = nullptr; 81 UiElement* audio_capture_indicator_ = nullptr;
81 UiElement* video_capture_indicator_ = nullptr; 82 UiElement* video_capture_indicator_ = nullptr;
82 UiElement* screen_capture_indicator_ = nullptr; 83 UiElement* screen_capture_indicator_ = nullptr;
83 UiElement* screen_dimmer_ = nullptr; 84 UiElement* screen_dimmer_ = nullptr;
84 UiElement* ceiling_ = nullptr; 85 UiElement* ceiling_ = nullptr;
85 UiElement* floor_ = nullptr; 86 UiElement* floor_ = nullptr;
86 UiElement* floor_grid_ = nullptr; 87 UiElement* floor_grid_ = nullptr;
87 UrlBar* url_bar_ = nullptr; 88 UrlBar* url_bar_ = nullptr;
88 LoadingIndicator* loading_indicator_ = nullptr; 89 LoadingIndicator* loading_indicator_ = nullptr;
89 90
90 bool in_cct_; 91 bool in_cct_;
91 bool web_vr_mode_; 92 bool web_vr_mode_;
92 bool secure_origin_ = false; 93 bool secure_origin_ = false;
93 bool fullscreen_ = false; 94 bool fullscreen_ = false;
95 bool incognito_ = false;
94 bool is_exiting_ = false; 96 bool is_exiting_ = false;
95 bool audio_capturing_ = false; 97 bool audio_capturing_ = false;
96 bool video_capturing_ = false; 98 bool video_capturing_ = false;
97 bool screen_capturing_ = false; 99 bool screen_capturing_ = false;
98 100
99 int next_available_id_ = 1; 101 int next_available_id_ = 1;
100 102
101 std::vector<UiElement*> content_elements_; 103 std::vector<UiElement*> content_elements_;
102 std::vector<UiElement*> control_elements_; 104 std::vector<UiElement*> control_elements_;
103 105
104 base::OneShotTimer security_warning_timer_; 106 base::OneShotTimer security_warning_timer_;
105 107
106 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; 108 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_;
107 109
108 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); 110 DISALLOW_COPY_AND_ASSIGN(UiSceneManager);
109 }; 111 };
110 112
111 } // namespace vr_shell 113 } // namespace vr_shell
112 114
113 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ 115 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698