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

Unified Diff: chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc

Issue 294393010: Hook up external monitor detection in PepperFlashDRM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PPB_Flash_DRM_1_1 to the proxy. Created 6 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 | « no previous file | ppapi/thunk/interfaces_ppb_private_flash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
index 1897125cf0832fec417e6ebdcedec62f0e218942..604b13a6da236045ba0eec7075213eb39499c2b4 100644
--- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
@@ -170,13 +170,17 @@ int32_t PepperFlashDRMHost::OnHostMsgGetHmonitor(
int32_t PepperFlashDRMHost::OnHostMsgMonitorIsExternal(
ppapi::host::HostMessageContext* context) {
int64_t monitor_id = monitor_finder_->GetMonitor();
- if (monitor_id) {
- // TODO(bbudge) get information about whether monitor is external.
- context->reply_msg =
- PpapiPluginMsg_FlashDRM_MonitorIsExternalReply(PP_FALSE);
- return PP_OK;
- }
- return PP_ERROR_FAILED;
+ if (!monitor_id)
+ return PP_ERROR_FAILED;
+
+ PP_Bool is_external = PP_FALSE;
+#if defined(OS_MACOSX)
+ if (!MonitorFinder::IsMonitorBuiltIn(monitor_id))
+ is_external = PP_TRUE;
+#endif
+ context->reply_msg =
+ PpapiPluginMsg_FlashDRM_MonitorIsExternalReply(is_external);
+ return PP_OK;
}
void PepperFlashDRMHost::GotDeviceID(
« no previous file with comments | « no previous file | ppapi/thunk/interfaces_ppb_private_flash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698