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

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

Issue 2953073003: VR: Disable system indicators in full-screen mode. (Closed)
Patch Set: 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
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..3489d5e0ce05ec63452f88ea8dddc4f84e15cdbb 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,8 @@ void UiSceneManager::ConfigureScene() {
scene_->SetBackgroundDistance(main_content_->translation().z() *
-kBackgroundDistanceMultiplier);
UpdateBackgroundColor();
+
+ ConfigureIndicators();
amp 2017/06/23 18:36:59 Add a comment about why the indicators need to be
cjgrant 2017/06/23 19:38:26 I'll add the comment. At a high-level, I see Conf
}
void UiSceneManager::UpdateBackgroundColor() {
@@ -545,8 +546,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 +579,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.

Powered by Google App Engine
This is Rietveld 408576698