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 "content/plugin/webplugin_proxy.h" | 5 #include "content/plugin/webplugin_proxy.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 #if defined(OS_WIN) | 141 #if defined(OS_WIN) |
142 void WebPluginProxy::SetWindowlessPumpEvent(HANDLE pump_messages_event) { | 142 void WebPluginProxy::SetWindowlessPumpEvent(HANDLE pump_messages_event) { |
143 HANDLE pump_messages_event_for_renderer = NULL; | 143 HANDLE pump_messages_event_for_renderer = NULL; |
144 content::BrokerDuplicateHandle(pump_messages_event, channel_->peer_pid(), | 144 content::BrokerDuplicateHandle(pump_messages_event, channel_->peer_pid(), |
145 &pump_messages_event_for_renderer, | 145 &pump_messages_event_for_renderer, |
146 SYNCHRONIZE | EVENT_MODIFY_STATE, 0); | 146 SYNCHRONIZE | EVENT_MODIFY_STATE, 0); |
147 DCHECK(pump_messages_event_for_renderer != NULL); | 147 DCHECK(pump_messages_event_for_renderer != NULL); |
148 Send(new PluginHostMsg_SetWindowlessPumpEvent( | 148 Send(new PluginHostMsg_SetWindowlessPumpEvent( |
149 route_id_, pump_messages_event_for_renderer)); | 149 route_id_, pump_messages_event_for_renderer)); |
150 } | 150 } |
151 | |
152 void WebPluginProxy::ReparentPluginWindow(HWND window, HWND parent) { | |
153 PluginThread::current()->Send( | |
154 new PluginProcessHostMsg_ReparentPluginWindow(window, parent)); | |
155 } | |
156 | |
157 void WebPluginProxy::ReportExecutableMemory(size_t size) { | |
158 PluginThread::current()->Send( | |
159 new PluginProcessHostMsg_ReportExecutableMemory(size)); | |
160 } | |
161 #endif | 151 #endif |
162 | 152 |
163 void WebPluginProxy::CancelResource(unsigned long id) { | 153 void WebPluginProxy::CancelResource(unsigned long id) { |
164 Send(new PluginHostMsg_CancelResource(route_id_, id)); | 154 Send(new PluginHostMsg_CancelResource(route_id_, id)); |
165 resource_clients_.erase(id); | 155 resource_clients_.erase(id); |
166 } | 156 } |
167 | 157 |
168 void WebPluginProxy::Invalidate() { | 158 void WebPluginProxy::Invalidate() { |
169 gfx::Rect rect(0, 0, | 159 gfx::Rect rect(0, 0, |
170 delegate_->GetRect().width(), | 160 delegate_->GetRect().width(), |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 // Retrieve the IME status from a plug-in and send it to a renderer process | 779 // Retrieve the IME status from a plug-in and send it to a renderer process |
790 // when the plug-in has updated it. | 780 // when the plug-in has updated it. |
791 int input_type; | 781 int input_type; |
792 gfx::Rect caret_rect; | 782 gfx::Rect caret_rect; |
793 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) | 783 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) |
794 return; | 784 return; |
795 | 785 |
796 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); | 786 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); |
797 } | 787 } |
798 #endif | 788 #endif |
OLD | NEW |