| 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" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 void SetSecurityLevel(int level); | 39 void SetSecurityLevel(int level); |
| 40 void SetLoading(bool loading); | 40 void SetLoading(bool loading); |
| 41 void SetLoadProgress(float progress); | 41 void SetLoadProgress(float progress); |
| 42 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward); | 42 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward); |
| 43 | 43 |
| 44 void OnAppButtonClicked(); | 44 void OnAppButtonClicked(); |
| 45 void OnAppButtonGesturePerformed(UiInterface::Direction direction); | 45 void OnAppButtonGesturePerformed(UiInterface::Direction direction); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 void CreateSecurityWarnings(); | 48 void CreateSecurityWarnings(); |
| 49 void CreateSystemIndicators(); |
| 49 void CreateContentQuad(); | 50 void CreateContentQuad(); |
| 50 void CreateBackground(); | 51 void CreateBackground(); |
| 51 void CreateUrlBar(); | 52 void CreateUrlBar(); |
| 52 void CreateCloseButton(); | 53 void CreateCloseButton(); |
| 53 | 54 |
| 54 void ConfigureScene(); | 55 void ConfigureScene(); |
| 55 void ConfigureSecurityWarnings(); | 56 void ConfigureSecurityWarnings(); |
| 56 void OnSecurityWarningTimer(); | 57 void OnSecurityWarningTimer(); |
| 57 void OnBackButtonClicked(); | 58 void OnBackButtonClicked(); |
| 58 void OnCloseButtonClicked(); | 59 void OnCloseButtonClicked(); |
| 59 int AllocateId(); | 60 int AllocateId(); |
| 60 | 61 |
| 61 VrBrowserInterface* browser_; | 62 VrBrowserInterface* browser_; |
| 62 UiScene* scene_; | 63 UiScene* scene_; |
| 63 | 64 |
| 64 // UI element pointers (not owned by the scene manager). | 65 // UI element pointers (not owned by the scene manager). |
| 65 UiElement* permanent_security_warning_ = nullptr; | 66 UiElement* permanent_security_warning_ = nullptr; |
| 66 UiElement* transient_security_warning_ = nullptr; | 67 UiElement* transient_security_warning_ = nullptr; |
| 67 UiElement* main_content_ = nullptr; | 68 UiElement* main_content_ = nullptr; |
| 69 UiElement* audio_input_indicator_ = nullptr; |
| 70 UiElement* video_input_indicator_ = nullptr; |
| 68 UrlBar* url_bar_ = nullptr; | 71 UrlBar* url_bar_ = nullptr; |
| 69 LoadingIndicator* loading_indicator_ = nullptr; | 72 LoadingIndicator* loading_indicator_ = nullptr; |
| 70 | 73 |
| 71 bool in_cct_; | 74 bool in_cct_; |
| 72 bool web_vr_mode_; | 75 bool web_vr_mode_; |
| 73 bool secure_origin_ = false; | 76 bool secure_origin_ = false; |
| 74 bool fullscreen_ = false; | 77 bool fullscreen_ = false; |
| 75 | 78 |
| 76 int next_available_id_ = 1; | 79 int next_available_id_ = 1; |
| 77 | 80 |
| 78 std::vector<UiElement*> content_elements_; | 81 std::vector<UiElement*> content_elements_; |
| 79 std::vector<UiElement*> control_elements_; | 82 std::vector<UiElement*> control_elements_; |
| 80 | 83 |
| 81 base::OneShotTimer security_warning_timer_; | 84 base::OneShotTimer security_warning_timer_; |
| 82 | 85 |
| 83 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; | 86 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; |
| 84 | 87 |
| 85 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); | 88 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); |
| 86 }; | 89 }; |
| 87 | 90 |
| 88 } // namespace vr_shell | 91 } // namespace vr_shell |
| 89 | 92 |
| 90 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ | 93 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ |
| OLD | NEW |