Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/webplugin_delegate_proxy.h" | 5 #include "content/renderer/webplugin_delegate_proxy.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 438 | 438 |
| 439 bool WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) { | 439 bool WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) { |
| 440 content::GetContentClient()->SetActiveURL(page_url_); | 440 content::GetContentClient()->SetActiveURL(page_url_); |
| 441 | 441 |
| 442 bool handled = true; | 442 bool handled = true; |
| 443 IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg) | 443 IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg) |
| 444 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow) | 444 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow) |
| 445 #if defined(OS_WIN) | 445 #if defined(OS_WIN) |
| 446 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent, | 446 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent, |
| 447 OnSetWindowlessPumpEvent) | 447 OnSetWindowlessPumpEvent) |
| 448 IPC_MESSAGE_HANDLER(PluginHostMsg_NotifyIMEStatus, | |
| 449 OnNotifyIMEStatus) | |
| 448 #endif | 450 #endif |
| 449 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelResource, OnCancelResource) | 451 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelResource, OnCancelResource) |
| 450 IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect) | 452 IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect) |
| 451 IPC_MESSAGE_HANDLER(PluginHostMsg_GetWindowScriptNPObject, | 453 IPC_MESSAGE_HANDLER(PluginHostMsg_GetWindowScriptNPObject, |
| 452 OnGetWindowScriptNPObject) | 454 OnGetWindowScriptNPObject) |
| 453 IPC_MESSAGE_HANDLER(PluginHostMsg_GetPluginElement, | 455 IPC_MESSAGE_HANDLER(PluginHostMsg_GetPluginElement, |
| 454 OnGetPluginElement) | 456 OnGetPluginElement) |
| 455 IPC_MESSAGE_HANDLER(PluginHostMsg_SetCookie, OnSetCookie) | 457 IPC_MESSAGE_HANDLER(PluginHostMsg_SetCookie, OnSetCookie) |
| 456 IPC_MESSAGE_HANDLER(PluginHostMsg_GetCookies, OnGetCookies) | 458 IPC_MESSAGE_HANDLER(PluginHostMsg_GetCookies, OnGetCookies) |
| 457 IPC_MESSAGE_HANDLER(PluginHostMsg_MissingPluginStatus, | 459 IPC_MESSAGE_HANDLER(PluginHostMsg_MissingPluginStatus, |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1047 DCHECK(modal_loop_pump_messages_event_ == NULL); | 1049 DCHECK(modal_loop_pump_messages_event_ == NULL); |
| 1048 | 1050 |
| 1049 // Bug 25583: this can be null because some "virus scanners" block the | 1051 // Bug 25583: this can be null because some "virus scanners" block the |
| 1050 // DuplicateHandle call in the plugin process. | 1052 // DuplicateHandle call in the plugin process. |
| 1051 if (!modal_loop_pump_messages_event) | 1053 if (!modal_loop_pump_messages_event) |
| 1052 return; | 1054 return; |
| 1053 | 1055 |
| 1054 modal_loop_pump_messages_event_.reset( | 1056 modal_loop_pump_messages_event_.reset( |
| 1055 new base::WaitableEvent(modal_loop_pump_messages_event)); | 1057 new base::WaitableEvent(modal_loop_pump_messages_event)); |
| 1056 } | 1058 } |
| 1059 | |
| 1060 void WebPluginDelegateProxy::OnNotifyIMEStatus(int input_type, | |
| 1061 const gfx::Rect& caret_rect) { | |
| 1062 if (render_view_) | |
| 1063 render_view_->UpdatePluginIMEStatus(input_type, caret_rect); | |
|
brettw
2011/06/13 14:27:10
Unless you have future plans for the code in Rende
Hironori Bono
2011/06/16 07:34:11
Done. Thank you for noticing it.
| |
| 1064 } | |
| 1057 #endif | 1065 #endif |
| 1058 | 1066 |
| 1059 void WebPluginDelegateProxy::OnCancelResource(int id) { | 1067 void WebPluginDelegateProxy::OnCancelResource(int id) { |
| 1060 if (plugin_) | 1068 if (plugin_) |
| 1061 plugin_->CancelResource(id); | 1069 plugin_->CancelResource(id); |
| 1062 } | 1070 } |
| 1063 | 1071 |
| 1064 void WebPluginDelegateProxy::OnInvalidateRect(const gfx::Rect& rect) { | 1072 void WebPluginDelegateProxy::OnInvalidateRect(const gfx::Rect& rect) { |
| 1065 if (!plugin_) | 1073 if (!plugin_) |
| 1066 return; | 1074 return; |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1365 } | 1373 } |
| 1366 #endif | 1374 #endif |
| 1367 | 1375 |
| 1368 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1376 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
| 1369 int resource_id) { | 1377 int resource_id) { |
| 1370 if (!plugin_) | 1378 if (!plugin_) |
| 1371 return; | 1379 return; |
| 1372 | 1380 |
| 1373 plugin_->URLRedirectResponse(allow, resource_id); | 1381 plugin_->URLRedirectResponse(allow, resource_id); |
| 1374 } | 1382 } |
| OLD | NEW |