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

Side by Side Diff: chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 ~MonitorFinder() { } 70 ~MonitorFinder() { }
71 71
72 void FetchMonitorFromWidget() { 72 void FetchMonitorFromWidget() {
73 InterlockedExchange(&request_sent_, 0); 73 InterlockedExchange(&request_sent_, 0);
74 content::RenderFrameHost* rfh = 74 content::RenderFrameHost* rfh =
75 content::RenderFrameHost::FromID(process_id_, render_frame_id_); 75 content::RenderFrameHost::FromID(process_id_, render_frame_id_);
76 if (!rfh) 76 if (!rfh)
77 return; 77 return;
78 gfx::NativeView native_view = rfh->GetNativeView(); 78 gfx::NativeView native_view = rfh->GetNativeView();
79 #if defined(USE_AURA) 79 #if defined(USE_AURA)
80 aura::WindowEventDispatcher* dispatcher = native_view->GetDispatcher(); 80 aura::WindowTreeHost* host = native_view->GetHost();
81 if (!dispatcher) 81 if (!host)
82 return; 82 return;
83 HWND window = dispatcher->host()->GetAcceleratedWidget(); 83 HWND window = host->GetAcceleratedWidget();
84 #else 84 #else
85 HWND window = native_view; 85 HWND window = native_view;
86 #endif 86 #endif
87 HMONITOR monitor = ::MonitorFromWindow(window, MONITOR_DEFAULTTONULL); 87 HMONITOR monitor = ::MonitorFromWindow(window, MONITOR_DEFAULTTONULL);
88 InterlockedExchangePointer(reinterpret_cast<void* volatile *>(&monitor_), 88 InterlockedExchangePointer(reinterpret_cast<void* volatile *>(&monitor_),
89 monitor); 89 monitor);
90 } 90 }
91 91
92 const int process_id_; 92 const int process_id_;
93 const int render_frame_id_; 93 const int render_frame_id_;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if (id.empty() && result == PP_OK) { 188 if (id.empty() && result == PP_OK) {
189 NOTREACHED(); 189 NOTREACHED();
190 result = PP_ERROR_FAILED; 190 result = PP_ERROR_FAILED;
191 } 191 }
192 reply_context.params.set_result(result); 192 reply_context.params.set_result(result);
193 host()->SendReply(reply_context, 193 host()->SendReply(reply_context,
194 PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id)); 194 PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id));
195 } 195 }
196 196
197 } // namespace chrome 197 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698