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

Unified Diff: chrome/browser/media/media_capture_devices_dispatcher.cc

Issue 139053003: Chrome OS: avoid suspending on lid close when casting is active. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove dependencies of chrome in ash. Created 6 years, 11 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/media/media_capture_devices_dispatcher.cc
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc
index 29c7afbec8d820c24b7dbcf33b752af116bfd7db..45af30e2cbff8ed08ccd7057a8f8ba1adaa9a945 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc
@@ -755,6 +755,18 @@ void MediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread(
}
}
+#if defined(OS_CHROMEOS)
+ // Notify ash that screen sharing state has changed.
+ if (device.type == content::MEDIA_TAB_VIDEO_CAPTURE ||
+ device.type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
+ if (state == content::MEDIA_REQUEST_STATE_DONE) {
+ ash::Shell::GetInstance()->OnScreenSharingStateChanged(true);
Sergey Ulanov 2014/01/15 22:23:45 can ash::Shell register itself as an observer?
Daniel Erat 2014/01/15 22:42:59 like haixia said, this would only be possible if t
+ } else if (state == content::MEDIA_REQUEST_STATE_CLOSING) {
+ ash::Shell::GetInstance()->OnScreenSharingStateChanged(false);
+ }
+ }
+#endif
+
FOR_EACH_OBSERVER(Observer, observers_,
OnRequestUpdate(render_process_id,
render_view_id,

Powered by Google App Engine
This is Rietveld 408576698