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

Unified Diff: chrome/browser/android/vr_shell/ui_scene_manager.cc

Issue 2953073003: VR: Disable system indicators in full-screen mode. (Closed)
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_scene_manager.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager.cc b/chrome/browser/android/vr_shell/ui_scene_manager.cc
index 84d337bd8431b532b20f00c8c16451d2c9eda93e..3a4b2e058eeb980cc182aaad6de3418d00aca050 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -436,7 +436,6 @@ void UiSceneManager::SetWebVrMode(bool web_vr,
ConfigureScene();
ConfigureSecurityWarnings();
ConfigureTransientUrlBar();
- ConfigureIndicators();
ConfigurePresentationToast();
}
@@ -498,6 +497,14 @@ void UiSceneManager::ConfigureScene() {
scene_->SetBackgroundDistance(main_content_->translation().z() *
-kBackgroundDistanceMultiplier);
UpdateBackgroundColor();
+
+ // Configure other subsystems here as well. Ultimately, it would be nice if we
+ // could configure all elements through ConfigureScene(), as the exact
+ // conditions that control each element are getting complicated. More systems
+ // should move in here, such that a single method call can update the entire
+ // scene. The drawback is slightly more overhead for individual scene
+ // reconfigurations.
+ ConfigureIndicators();
}
void UiSceneManager::UpdateBackgroundColor() {
@@ -545,8 +552,7 @@ void UiSceneManager::SetIncognito(bool incognito) {
void UiSceneManager::OnGLInitialized() {
scene_->OnGLInitialized();
- // Indicators don't know their position until they've rendered themselves.
- ConfigureIndicators();
+ ConfigureScene();
}
void UiSceneManager::OnAppButtonClicked() {
@@ -579,10 +585,14 @@ void UiSceneManager::ConfigureSecurityWarnings() {
}
void UiSceneManager::ConfigureIndicators() {
- audio_capture_indicator_->set_visible(!web_vr_mode_ && audio_capturing_);
- video_capture_indicator_->set_visible(!web_vr_mode_ && video_capturing_);
- screen_capture_indicator_->set_visible(!web_vr_mode_ && screen_capturing_);
- location_access_indicator_->set_visible(!web_vr_mode_ && location_access_);
+ bool allowed = !web_vr_mode_ && !fullscreen_;
+ audio_capture_indicator_->set_visible(allowed && audio_capturing_);
+ video_capture_indicator_->set_visible(allowed && video_capturing_);
+ screen_capture_indicator_->set_visible(allowed && screen_capturing_);
+ location_access_indicator_->set_visible(allowed && location_access_);
+
+ if (!allowed)
+ return;
// Position elements dynamically relative to each other, based on which
// indicators are showing, and how big each one is.
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698