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

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

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

Powered by Google App Engine
This is Rietveld 408576698