| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h" | 5 #include "chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <Windows.h> | 8 #include <Windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 if (!rwh) | 77 if (!rwh) |
| 78 return; | 78 return; |
| 79 content::RenderWidgetHostView* view = rwh->GetView(); | 79 content::RenderWidgetHostView* view = rwh->GetView(); |
| 80 if (!view) | 80 if (!view) |
| 81 return; | 81 return; |
| 82 gfx::NativeView native_view = view->GetNativeView(); | 82 gfx::NativeView native_view = view->GetNativeView(); |
| 83 #if defined(USE_AURA) | 83 #if defined(USE_AURA) |
| 84 aura::WindowEventDispatcher* dispatcher = native_view->GetDispatcher(); | 84 aura::WindowEventDispatcher* dispatcher = native_view->GetDispatcher(); |
| 85 if (!dispatcher) | 85 if (!dispatcher) |
| 86 return; | 86 return; |
| 87 HWND window = dispatcher->GetAcceleratedWidget(); | 87 HWND window = dispatcher->host()->GetAcceleratedWidget(); |
| 88 #else | 88 #else |
| 89 HWND window = native_view; | 89 HWND window = native_view; |
| 90 #endif | 90 #endif |
| 91 HMONITOR monitor = ::MonitorFromWindow(window, MONITOR_DEFAULTTONULL); | 91 HMONITOR monitor = ::MonitorFromWindow(window, MONITOR_DEFAULTTONULL); |
| 92 InterlockedExchangePointer(reinterpret_cast<void* volatile *>(&monitor_), | 92 InterlockedExchangePointer(reinterpret_cast<void* volatile *>(&monitor_), |
| 93 monitor); | 93 monitor); |
| 94 } | 94 } |
| 95 | 95 |
| 96 const int process_id_; | 96 const int process_id_; |
| 97 const int render_id_; | 97 const int render_id_; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 if (id.empty() && result == PP_OK) { | 177 if (id.empty() && result == PP_OK) { |
| 178 NOTREACHED(); | 178 NOTREACHED(); |
| 179 result = PP_ERROR_FAILED; | 179 result = PP_ERROR_FAILED; |
| 180 } | 180 } |
| 181 reply_context.params.set_result(result); | 181 reply_context.params.set_result(result); |
| 182 host()->SendReply(reply_context, | 182 host()->SendReply(reply_context, |
| 183 PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id)); | 183 PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id)); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace chrome | 186 } // namespace chrome |
| OLD | NEW |