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

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

Issue 2918213002: VR: Update UiSceneManager with screen capturing flag (Closed)
Patch Set: 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 0b702e74c7730c1813eb335b22bf6cef5f21fa0e..1c18411ea2c76e70eb243ddde5fb7d923bb696b2 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -305,6 +305,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() {
@@ -352,15 +355,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) {
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.h ('k') | 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