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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index 332ed1a1b96d266bf755c49e93fbdd9b51b01cb6..1e154e27a664b0dc11ce742606f9f6305b0f9606 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -649,9 +649,21 @@ void VrShell::PollMediaAccessFlag() {
num_tabs_capturing_screen++;
}
- ui_->SetAudioCapturingIndicator(num_tabs_capturing_audio > 0);
- ui_->SetVideoCapturingIndicator(num_tabs_capturing_video > 0);
- ui_->SetScreenCapturingIndicator(num_tabs_capturing_screen > 0);
+ bool is_capturing_audio = num_tabs_capturing_audio > 0;
+ bool is_capturing_video = num_tabs_capturing_video > 0;
+ bool is_capturing_screen = num_tabs_capturing_screen > 0;
+ if (is_capturing_audio != is_capturing_audio_) {
+ ui_->SetAudioCapturingIndicator(is_capturing_audio);
+ is_capturing_audio_ = is_capturing_audio;
+ }
+ if (is_capturing_video != is_capturing_video_) {
+ ui_->SetVideoCapturingIndicator(is_capturing_video);
+ is_capturing_video_ = is_capturing_video;
+ }
+ if (is_capturing_screen != is_capturing_screen_) {
+ ui_->SetScreenCapturingIndicator(is_capturing_screen);
+ is_capturing_screen_ = is_capturing_screen;
+ }
}
void VrShell::SetContentCssSize(float width, float height, float dpr) {
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698