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

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

Issue 2890563003: VR: Update UiSceneManager with audio/video capturing flags (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/vr_shell.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index c32e477f7b76dcd5eecf5d42f5a2828e2f32c90f..dd734df55aa8ce787166bb3a01c507c88135ae1f 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -551,23 +551,28 @@ void VrShell::PollMediaAccessFlag() {
->GetMediaStreamCaptureIndicator();
bool is_capturing_audio = indicator->IsCapturingAudio(web_contents_);
if (is_capturing_audio != is_capturing_audio_)
- PostToGlThreadWhenReady(base::Bind(&VrShellGl::SetAudioCapturingWarning,
- gl_thread_->GetVrShellGl(),
- is_capturing_audio));
+ gl_thread_->task_runner()->PostTask(
cjgrant 2017/05/16 19:09:27 These calls should go through the ui_ interface.
asimjour1 2017/05/16 20:13:55 Done.
+ FROM_HERE,
+ base::Bind(&UiSceneManager::SetAudioCapturingIndicator,
+ gl_thread_->GetSceneManager(), is_capturing_audio));
+
is_capturing_audio_ = is_capturing_audio;
bool is_capturing_video = indicator->IsCapturingVideo(web_contents_);
if (is_capturing_video != is_capturing_video_)
- PostToGlThreadWhenReady(base::Bind(&VrShellGl::SetVideoCapturingWarning,
- gl_thread_->GetVrShellGl(),
- is_capturing_video));
+ gl_thread_->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&UiSceneManager::SetVideoCapturingIndicator,
+ gl_thread_->GetSceneManager(), is_capturing_video));
is_capturing_video_ = is_capturing_video;
bool is_capturing_screen = indicator->IsBeingMirrored(web_contents_);
if (is_capturing_screen != is_capturing_screen_)
- PostToGlThreadWhenReady(base::Bind(&VrShellGl::SetScreenCapturingWarning,
- gl_thread_->GetVrShellGl(),
- is_capturing_screen));
+ gl_thread_->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&UiSceneManager::SetScreenCapturingIndicator,
+ gl_thread_->GetSceneManager(), is_capturing_screen));
+
is_capturing_screen_ = is_capturing_screen;
}

Powered by Google App Engine
This is Rietveld 408576698