| 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 12 matching lines...) Expand all Loading... |
| 23 class UiSceneManager { | 23 class UiSceneManager { |
| 24 public: | 24 public: |
| 25 UiSceneManager(VrBrowserInterface* browser, | 25 UiSceneManager(VrBrowserInterface* browser, |
| 26 UiScene* scene, | 26 UiScene* scene, |
| 27 bool in_cct, | 27 bool in_cct, |
| 28 bool in_web_vr); | 28 bool in_web_vr); |
| 29 ~UiSceneManager(); | 29 ~UiSceneManager(); |
| 30 | 30 |
| 31 base::WeakPtr<UiSceneManager> GetWeakPtr(); | 31 base::WeakPtr<UiSceneManager> GetWeakPtr(); |
| 32 | 32 |
| 33 void SetWebVrMode(bool web_vr); |
| 33 void SetWebVrSecureOrigin(bool secure); | 34 void SetWebVrSecureOrigin(bool secure); |
| 34 void SetWebVrMode(bool web_vr); | |
| 35 void SetURL(const GURL& gurl); | 35 void SetURL(const GURL& gurl); |
| 36 // These methods are currently stubbed. | 36 // These methods are currently stubbed. |
| 37 void SetFullscreen(bool enabled); | 37 void SetFullscreen(bool enabled); |
| 38 void SetSecurityLevel(int level); | 38 void SetSecurityLevel(int level); |
| 39 void SetLoading(bool loading); | 39 void SetLoading(bool loading); |
| 40 void SetLoadProgress(double progress); | 40 void SetLoadProgress(double progress); |
| 41 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward); | 41 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward); |
| 42 | 42 |
| 43 void OnAppButtonClicked(); | 43 void OnAppButtonClicked(); |
| 44 void OnAppButtonGesturePerformed(UiInterface::Direction direction); | 44 void OnAppButtonGesturePerformed(UiInterface::Direction direction); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 void CreateSecurityWarnings(); | 47 void CreateSecurityWarnings(); |
| 48 void CreateContentQuad(); | 48 void CreateContentQuad(); |
| 49 void CreateBackground(); | 49 void CreateBackground(); |
| 50 void CreateUrlBar(); | 50 void CreateUrlBar(); |
| 51 | 51 |
| 52 void ConfigureSecurityWarnings(); | 52 void ConfigureSecurityWarnings(); |
| 53 void OnSecurityWarningTimer(); | 53 void OnSecurityWarningTimer(); |
| 54 void OnBackButtonClicked(); |
| 54 int AllocateId(); | 55 int AllocateId(); |
| 55 | 56 |
| 56 VrBrowserInterface* browser_; | 57 VrBrowserInterface* browser_; |
| 57 UiScene* scene_; | 58 UiScene* scene_; |
| 58 | 59 |
| 59 // UI element pointers (not owned by the scene manager). | 60 // UI element pointers (not owned by the scene manager). |
| 60 UiElement* permanent_security_warning_ = nullptr; | 61 UiElement* permanent_security_warning_ = nullptr; |
| 61 UiElement* transient_security_warning_ = nullptr; | 62 UiElement* transient_security_warning_ = nullptr; |
| 62 UiElement* main_content_ = nullptr; | 63 UiElement* main_content_ = nullptr; |
| 63 UrlBar* url_bar_ = nullptr; | 64 UrlBar* url_bar_ = nullptr; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 74 base::OneShotTimer security_warning_timer_; | 75 base::OneShotTimer security_warning_timer_; |
| 75 | 76 |
| 76 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; | 77 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); | 79 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace vr_shell | 82 } // namespace vr_shell |
| 82 | 83 |
| 83 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ | 84 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ |
| OLD | NEW |