OLD | NEW |
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/ui_interface.h" | 12 #include "chrome/browser/android/vr_shell/ui_interface.h" |
| 13 #include "device/vr/vr_types.h" |
13 | 14 |
14 class GURL; | 15 class GURL; |
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; |
(...skipping 29 matching lines...) Expand all Loading... |
52 void CreateScreenDimmer(); | 53 void CreateScreenDimmer(); |
53 void CreateSecurityWarnings(); | 54 void CreateSecurityWarnings(); |
54 void CreateSystemIndicators(); | 55 void CreateSystemIndicators(); |
55 void CreateContentQuad(); | 56 void CreateContentQuad(); |
56 void CreateBackground(); | 57 void CreateBackground(); |
57 void CreateUrlBar(); | 58 void CreateUrlBar(); |
58 void CreateCloseButton(); | 59 void CreateCloseButton(); |
59 void CreateExitWarning(); | 60 void CreateExitWarning(); |
60 | 61 |
61 void ConfigureScene(); | 62 void ConfigureScene(); |
| 63 void ConfigureBackgroundColor(vr::Colorf center_color, |
| 64 vr::Colorf horizon_color); |
62 void ConfigureSecurityWarnings(); | 65 void ConfigureSecurityWarnings(); |
63 void OnSecurityWarningTimer(); | 66 void OnSecurityWarningTimer(); |
64 void OnBackButtonClicked(); | 67 void OnBackButtonClicked(); |
65 void OnCloseButtonClicked(); | 68 void OnCloseButtonClicked(); |
66 int AllocateId(); | 69 int AllocateId(); |
67 | 70 |
68 VrBrowserInterface* browser_; | 71 VrBrowserInterface* browser_; |
69 UiScene* scene_; | 72 UiScene* scene_; |
70 | 73 |
71 // UI element pointers (not owned by the scene manager). | 74 // UI element pointers (not owned by the scene manager). |
72 UiElement* permanent_security_warning_ = nullptr; | 75 UiElement* permanent_security_warning_ = nullptr; |
73 UiElement* transient_security_warning_ = nullptr; | 76 UiElement* transient_security_warning_ = nullptr; |
74 UiElement* exit_warning_ = nullptr; | 77 UiElement* exit_warning_ = nullptr; |
75 UiElement* main_content_ = nullptr; | 78 UiElement* main_content_ = nullptr; |
76 UiElement* audio_capture_indicator_ = nullptr; | 79 UiElement* audio_capture_indicator_ = nullptr; |
77 UiElement* video_capture_indicator_ = nullptr; | 80 UiElement* video_capture_indicator_ = nullptr; |
78 UiElement* screen_capture_indicator_ = nullptr; | 81 UiElement* screen_capture_indicator_ = nullptr; |
79 UiElement* screen_dimmer_ = nullptr; | 82 UiElement* screen_dimmer_ = nullptr; |
| 83 UiElement* ceiling_ = nullptr; |
| 84 UiElement* floor_ = nullptr; |
| 85 UiElement* floor_grid_ = nullptr; |
80 UrlBar* url_bar_ = nullptr; | 86 UrlBar* url_bar_ = nullptr; |
81 LoadingIndicator* loading_indicator_ = nullptr; | 87 LoadingIndicator* loading_indicator_ = nullptr; |
82 | 88 |
83 bool in_cct_; | 89 bool in_cct_; |
84 bool web_vr_mode_; | 90 bool web_vr_mode_; |
85 bool secure_origin_ = false; | 91 bool secure_origin_ = false; |
86 bool fullscreen_ = false; | 92 bool fullscreen_ = false; |
87 bool is_exiting_ = false; | 93 bool is_exiting_ = false; |
88 | 94 |
89 int next_available_id_ = 1; | 95 int next_available_id_ = 1; |
90 | 96 |
91 std::vector<UiElement*> content_elements_; | 97 std::vector<UiElement*> content_elements_; |
92 std::vector<UiElement*> control_elements_; | 98 std::vector<UiElement*> control_elements_; |
93 | 99 |
94 base::OneShotTimer security_warning_timer_; | 100 base::OneShotTimer security_warning_timer_; |
95 | 101 |
96 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; | 102 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; |
97 | 103 |
98 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); | 104 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); |
99 }; | 105 }; |
100 | 106 |
101 } // namespace vr_shell | 107 } // namespace vr_shell |
102 | 108 |
103 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ | 109 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ |
OLD | NEW |