| 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/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 void SetVideoCapturingIndicator(bool enabled); | 45 void SetVideoCapturingIndicator(bool enabled); |
| 46 void SetScreenCapturingIndicator(bool enabled); | 46 void SetScreenCapturingIndicator(bool enabled); |
| 47 void SetAudioCapturingIndicator(bool enabled); | 47 void SetAudioCapturingIndicator(bool enabled); |
| 48 | 48 |
| 49 // These methods are currently stubbed. | 49 // These methods are currently stubbed. |
| 50 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward); | 50 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward); |
| 51 | 51 |
| 52 void OnAppButtonClicked(); | 52 void OnAppButtonClicked(); |
| 53 void OnAppButtonGesturePerformed(UiInterface::Direction direction); | 53 void OnAppButtonGesturePerformed(UiInterface::Direction direction); |
| 54 | 54 |
| 55 void OnSecurityIconClickedForTesting(); |
| 56 void OnExitPromptPrimaryButtonClickedForTesting(); |
| 57 |
| 55 private: | 58 private: |
| 56 FRIEND_TEST_ALL_PREFIXES(UiSceneManagerTest, UiUpdatesExitPrompt); | |
| 57 | |
| 58 void CreateScreenDimmer(); | 59 void CreateScreenDimmer(); |
| 59 void CreateSecurityWarnings(); | 60 void CreateSecurityWarnings(); |
| 60 void CreateSystemIndicators(); | 61 void CreateSystemIndicators(); |
| 61 void CreateContentQuad(); | 62 void CreateContentQuad(); |
| 62 void CreateBackground(); | 63 void CreateBackground(); |
| 63 void CreateUrlBar(); | 64 void CreateUrlBar(); |
| 64 void CreateCloseButton(); | 65 void CreateCloseButton(); |
| 66 void CreateExitPrompt(); |
| 65 | 67 |
| 66 void ConfigureScene(); | 68 void ConfigureScene(); |
| 67 void ConfigureSecurityWarnings(); | 69 void ConfigureSecurityWarnings(); |
| 68 void UpdateBackgroundColor(); | 70 void UpdateBackgroundColor(); |
| 71 void CloseExitPrompt(); |
| 69 void OnSecurityWarningTimer(); | 72 void OnSecurityWarningTimer(); |
| 70 void OnBackButtonClicked(); | 73 void OnBackButtonClicked(); |
| 71 void OnSecurityIconClicked(); | 74 void OnSecurityIconClicked(); |
| 72 void OnExitPromptPrimaryButtonClicked(); | 75 void OnExitPromptPrimaryButtonClicked(); |
| 73 void OnExitPromptSecondaryButtonClicked(); | 76 void OnExitPromptSecondaryButtonClicked(); |
| 77 void OnExitPromptBackplaneClicked(); |
| 74 void OnCloseButtonClicked(); | 78 void OnCloseButtonClicked(); |
| 75 void OnUnsupportedMode(UiUnsupportedMode mode); | 79 void OnUnsupportedMode(UiUnsupportedMode mode); |
| 76 int AllocateId(); | 80 int AllocateId(); |
| 77 ColorScheme::Mode mode() const; | 81 ColorScheme::Mode mode() const; |
| 78 const ColorScheme& color_scheme() const; | 82 const ColorScheme& color_scheme() const; |
| 79 | 83 |
| 80 UiBrowserInterface* browser_; | 84 UiBrowserInterface* browser_; |
| 81 UiScene* scene_; | 85 UiScene* scene_; |
| 82 | 86 |
| 83 // UI element pointers (not owned by the scene manager). | 87 // UI element pointers (not owned by the scene manager). |
| 84 UiElement* permanent_security_warning_ = nullptr; | 88 UiElement* permanent_security_warning_ = nullptr; |
| 85 UiElement* transient_security_warning_ = nullptr; | 89 UiElement* transient_security_warning_ = nullptr; |
| 86 UiElement* exit_prompt_ = nullptr; | 90 UiElement* exit_prompt_ = nullptr; |
| 91 UiElement* exit_prompt_backplane_ = nullptr; |
| 87 UiElement* exit_warning_ = nullptr; | 92 UiElement* exit_warning_ = nullptr; |
| 88 UiElement* main_content_ = nullptr; | 93 UiElement* main_content_ = nullptr; |
| 89 UiElement* main_content_backplane_ = nullptr; | |
| 90 UiElement* audio_capture_indicator_ = nullptr; | 94 UiElement* audio_capture_indicator_ = nullptr; |
| 91 UiElement* video_capture_indicator_ = nullptr; | 95 UiElement* video_capture_indicator_ = nullptr; |
| 92 UiElement* screen_capture_indicator_ = nullptr; | 96 UiElement* screen_capture_indicator_ = nullptr; |
| 93 UiElement* screen_dimmer_ = nullptr; | 97 UiElement* screen_dimmer_ = nullptr; |
| 94 UiElement* ceiling_ = nullptr; | 98 UiElement* ceiling_ = nullptr; |
| 95 UiElement* floor_ = nullptr; | 99 UiElement* floor_ = nullptr; |
| 96 UiElement* close_button_ = nullptr; | 100 UiElement* close_button_ = nullptr; |
| 97 UrlBar* url_bar_ = nullptr; | 101 UrlBar* url_bar_ = nullptr; |
| 98 LoadingIndicator* loading_indicator_ = nullptr; | 102 LoadingIndicator* loading_indicator_ = nullptr; |
| 99 | 103 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 115 base::OneShotTimer security_warning_timer_; | 119 base::OneShotTimer security_warning_timer_; |
| 116 | 120 |
| 117 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; | 121 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; |
| 118 | 122 |
| 119 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); | 123 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); |
| 120 }; | 124 }; |
| 121 | 125 |
| 122 } // namespace vr_shell | 126 } // namespace vr_shell |
| 123 | 127 |
| 124 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ | 128 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ |
| OLD | NEW |