| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/plugin/webplugin_proxy.h" | 5 #include "chrome/plugin/webplugin_proxy.h" |
| 6 | 6 |
| 7 #include "base/gfx/gdi_util.h" | 7 #include "base/gfx/gdi_util.h" |
| 8 #include "base/scoped_handle.h" | 8 #include "base/scoped_handle.h" |
| 9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
| 10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 parent_window_(NULL) { | 43 parent_window_(NULL) { |
| 44 | 44 |
| 45 HANDLE event; | 45 HANDLE event; |
| 46 BOOL result = DuplicateHandle(channel->renderer_handle(), | 46 BOOL result = DuplicateHandle(channel->renderer_handle(), |
| 47 modal_dialog_event, | 47 modal_dialog_event, |
| 48 GetCurrentProcess(), | 48 GetCurrentProcess(), |
| 49 &event, | 49 &event, |
| 50 SYNCHRONIZE, | 50 SYNCHRONIZE, |
| 51 FALSE, | 51 FALSE, |
| 52 0); | 52 0); |
| 53 DCHECK(result) << "Couldn't duplicate the modal dialog handle for the plugin."
; | 53 DCHECK(result) << |
| 54 "Couldn't duplicate the modal dialog handle for the plugin."; |
| 54 modal_dialog_event_.reset(new base::WaitableEvent(event)); | 55 modal_dialog_event_.reset(new base::WaitableEvent(event)); |
| 55 } | 56 } |
| 56 | 57 |
| 57 WebPluginProxy::~WebPluginProxy() { | 58 WebPluginProxy::~WebPluginProxy() { |
| 58 if (cp_browsing_context_) | 59 if (cp_browsing_context_) |
| 59 GetContextMap().erase(cp_browsing_context_); | 60 GetContextMap().erase(cp_browsing_context_); |
| 60 | 61 |
| 61 if (parent_window_) { | 62 if (parent_window_) { |
| 62 PluginThread::current()->Send( | 63 PluginThread::current()->Send( |
| 63 new PluginProcessHostMsg_DestroyWindow(parent_window_)); | 64 new PluginProcessHostMsg_DestroyWindow(parent_window_)); |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 | 429 |
| 429 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, | 430 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, |
| 430 range_info, existing_stream, | 431 range_info, existing_stream, |
| 431 notify_needed, notify_data)); | 432 notify_needed, notify_data)); |
| 432 } | 433 } |
| 433 | 434 |
| 434 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { | 435 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { |
| 435 Paint(damaged_rect); | 436 Paint(damaged_rect); |
| 436 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); | 437 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); |
| 437 } | 438 } |
| OLD | NEW |