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

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

Issue 2903673002: VR: Update UiSceneManager with screen capturing flag (Closed)
Patch Set: Indicators tests are added. Update the flags only when they change Created 3 years, 7 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 4845c90f9e9e21022f1f2de5301cdf72c04b6c76..9411724c804edade8fe1b01b7030da9b44a14876 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -319,6 +319,9 @@ void UiSceneManager::SetWebVrMode(bool web_vr) {
web_vr_mode_ = web_vr;
ConfigureScene();
ConfigureSecurityWarnings();
+ audio_capture_indicator_->set_visible(!web_vr && audio_capturing_);
+ video_capture_indicator_->set_visible(!web_vr && video_capturing_);
+ screen_capture_indicator_->set_visible(!web_vr && screen_capturing_);
}
void UiSceneManager::ConfigureScene() {
@@ -367,15 +370,18 @@ void UiSceneManager::UpdateBackgroundColor() {
}
void UiSceneManager::SetAudioCapturingIndicator(bool enabled) {
- audio_capture_indicator_->set_visible(enabled);
+ audio_capturing_ = enabled;
+ audio_capture_indicator_->set_visible(enabled && !web_vr_mode_);
}
void UiSceneManager::SetVideoCapturingIndicator(bool enabled) {
- video_capture_indicator_->set_visible(enabled);
+ video_capturing_ = enabled;
+ video_capture_indicator_->set_visible(enabled && !web_vr_mode_);
}
void UiSceneManager::SetScreenCapturingIndicator(bool enabled) {
- // TODO(asimjour) add the indicator and change the visibility here.
+ screen_capturing_ = enabled;
+ screen_capture_indicator_->set_visible(enabled && !web_vr_mode_);
}
void UiSceneManager::SetWebVrSecureOrigin(bool secure) {

Powered by Google App Engine
This is Rietveld 408576698