| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/renderer/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "content/common/browser_plugin/browser_plugin_constants.h" | 11 #include "content/common/browser_plugin/browser_plugin_constants.h" |
| 12 #include "content/common/browser_plugin/browser_plugin_messages.h" | 12 #include "content/common/browser_plugin/browser_plugin_messages.h" |
| 13 #include "content/common/view_messages.h" | 13 #include "content/common/view_messages.h" |
| 14 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
| 15 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
| 16 #include "content/public/renderer/browser_plugin_delegate.h" | 16 #include "content/public/renderer/browser_plugin_delegate.h" |
| 17 #include "content/public/renderer/content_renderer_client.h" | 17 #include "content/public/renderer/content_renderer_client.h" |
| 18 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 18 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
| 19 #include "content/renderer/child_frame_compositing_helper.h" | 19 #include "content/renderer/child_frame_compositing_helper.h" |
| 20 #include "content/renderer/cursor_utils.h" | 20 #include "content/renderer/cursor_utils.h" |
| 21 #include "content/renderer/drop_data_builder.h" | 21 #include "content/renderer/drop_data_builder.h" |
| 22 #include "content/renderer/render_thread_impl.h" | 22 #include "content/renderer/render_thread_impl.h" |
| 23 #include "content/renderer/sad_plugin.h" | 23 #include "content/renderer/sad_plugin.h" |
| 24 #include "third_party/WebKit/public/platform/WebRect.h" | 24 #include "third_party/WebKit/public/platform/WebRect.h" |
| 25 #include "third_party/WebKit/public/web/WebElement.h" | 25 #include "third_party/WebKit/public/web/WebElement.h" |
| 26 #include "third_party/WebKit/public/web/WebInputEvent.h" | 26 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 27 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 27 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
| 28 #include "third_party/WebKit/public/web/WebPluginParams.h" | |
| 29 #include "third_party/WebKit/public/web/WebView.h" | 28 #include "third_party/WebKit/public/web/WebView.h" |
| 30 #include "third_party/skia/include/core/SkCanvas.h" | 29 #include "third_party/skia/include/core/SkCanvas.h" |
| 31 #include "ui/events/keycodes/keyboard_codes.h" | 30 #include "ui/events/keycodes/keyboard_codes.h" |
| 32 | 31 |
| 33 using blink::WebCanvas; | 32 using blink::WebCanvas; |
| 34 using blink::WebPluginContainer; | 33 using blink::WebPluginContainer; |
| 35 using blink::WebPluginParams; | |
| 36 using blink::WebPoint; | 34 using blink::WebPoint; |
| 37 using blink::WebRect; | 35 using blink::WebRect; |
| 38 using blink::WebURL; | 36 using blink::WebURL; |
| 39 using blink::WebVector; | 37 using blink::WebVector; |
| 40 | 38 |
| 41 namespace { | 39 namespace { |
| 42 typedef std::map<blink::WebPluginContainer*, content::BrowserPlugin*> | 40 typedef std::map<blink::WebPluginContainer*, content::BrowserPlugin*> |
| 43 PluginContainerMap; | 41 PluginContainerMap; |
| 44 static base::LazyInstance<PluginContainerMap> g_plugin_container_map = | 42 static base::LazyInstance<PluginContainerMap> g_plugin_container_map = |
| 45 LAZY_INSTANCE_INITIALIZER; | 43 LAZY_INSTANCE_INITIALIZER; |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 const blink::WebMouseEvent& event) { | 651 const blink::WebMouseEvent& event) { |
| 654 browser_plugin_manager()->Send( | 652 browser_plugin_manager()->Send( |
| 655 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, | 653 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, |
| 656 browser_plugin_instance_id_, | 654 browser_plugin_instance_id_, |
| 657 plugin_rect_, | 655 plugin_rect_, |
| 658 &event)); | 656 &event)); |
| 659 return true; | 657 return true; |
| 660 } | 658 } |
| 661 | 659 |
| 662 } // namespace content | 660 } // namespace content |
| OLD | NEW |