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 |
11 #include <algorithm> | 11 #include <algorithm> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/file_util.h" | 15 #include "base/file_util.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/string_split.h" | 19 #include "base/string_split.h" |
20 #include "base/string_util.h" | 20 #include "base/string_util.h" |
21 #include "base/sys_info.h" | 21 #include "base/sys_info.h" |
22 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
23 #include "chrome/common/child_process_logging.h" | |
24 #include "chrome/common/render_messages.h" | |
25 #include "content/common/child_process.h" | 23 #include "content/common/child_process.h" |
26 #include "content/common/plugin_messages.h" | 24 #include "content/common/plugin_messages.h" |
27 #include "content/common/view_messages.h" | 25 #include "content/common/view_messages.h" |
28 #include "content/plugin/npobject_proxy.h" | 26 #include "content/plugin/npobject_proxy.h" |
29 #include "content/plugin/npobject_stub.h" | 27 #include "content/plugin/npobject_stub.h" |
30 #include "content/plugin/npobject_util.h" | 28 #include "content/plugin/npobject_util.h" |
31 #include "content/renderer/command_buffer_proxy.h" | 29 #include "content/renderer/command_buffer_proxy.h" |
32 #include "content/renderer/content_renderer_client.h" | 30 #include "content/renderer/content_renderer_client.h" |
33 #include "content/renderer/plugin_channel_host.h" | 31 #include "content/renderer/plugin_channel_host.h" |
34 #include "content/renderer/render_thread.h" | 32 #include "content/renderer/render_thread.h" |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 425 |
428 void WebPluginDelegateProxy::DidManualLoadFail() { | 426 void WebPluginDelegateProxy::DidManualLoadFail() { |
429 Send(new PluginMsg_DidManualLoadFail(instance_id_)); | 427 Send(new PluginMsg_DidManualLoadFail(instance_id_)); |
430 } | 428 } |
431 | 429 |
432 void WebPluginDelegateProxy::InstallMissingPlugin() { | 430 void WebPluginDelegateProxy::InstallMissingPlugin() { |
433 Send(new PluginMsg_InstallMissingPlugin(instance_id_)); | 431 Send(new PluginMsg_InstallMissingPlugin(instance_id_)); |
434 } | 432 } |
435 | 433 |
436 bool WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) { | 434 bool WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) { |
437 child_process_logging::SetActiveURL(page_url_); | 435 content::GetContentClient()->SetActiveURL(page_url_); |
438 | 436 |
439 bool handled = true; | 437 bool handled = true; |
440 IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg) | 438 IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg) |
441 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow) | 439 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow) |
442 #if defined(OS_WIN) | 440 #if defined(OS_WIN) |
443 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent, | 441 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent, |
444 OnSetWindowlessPumpEvent) | 442 OnSetWindowlessPumpEvent) |
445 #endif | 443 #endif |
446 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelResource, OnCancelResource) | 444 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelResource, OnCancelResource) |
447 IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect) | 445 IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect) |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 } | 1385 } |
1388 #endif | 1386 #endif |
1389 | 1387 |
1390 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1388 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
1391 int resource_id) { | 1389 int resource_id) { |
1392 if (!plugin_) | 1390 if (!plugin_) |
1393 return; | 1391 return; |
1394 | 1392 |
1395 plugin_->URLRedirectResponse(allow, resource_id); | 1393 plugin_->URLRedirectResponse(allow, resource_id); |
1396 } | 1394 } |
OLD | NEW |