| 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
| 14 #include "base/utf_offset_string_conversions.h" | 14 #include "base/utf_offset_string_conversions.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "ppapi/c/dev/ppb_console_dev.h" | 16 #include "ppapi/c/dev/ppb_console_dev.h" |
| 17 #include "ppapi/c/dev/ppb_find_dev.h" | 17 #include "ppapi/c/dev/ppb_find_dev.h" |
| 18 #include "ppapi/c/dev/ppb_memory_dev.h" | 18 #include "ppapi/c/dev/ppb_memory_dev.h" |
| 19 #include "ppapi/c/dev/ppb_zoom_dev.h" | 19 #include "ppapi/c/dev/ppb_zoom_dev.h" |
| 20 #include "ppapi/c/dev/ppp_find_dev.h" | 20 #include "ppapi/c/dev/ppp_find_dev.h" |
| 21 #include "ppapi/c/dev/ppp_mouse_lock_dev.h" | |
| 22 #include "ppapi/c/dev/ppp_policy_update_dev.h" | 21 #include "ppapi/c/dev/ppp_policy_update_dev.h" |
| 23 #include "ppapi/c/dev/ppp_selection_dev.h" | 22 #include "ppapi/c/dev/ppp_selection_dev.h" |
| 24 #include "ppapi/c/dev/ppp_zoom_dev.h" | 23 #include "ppapi/c/dev/ppp_zoom_dev.h" |
| 25 #include "ppapi/c/pp_input_event.h" | 24 #include "ppapi/c/pp_input_event.h" |
| 26 #include "ppapi/c/pp_instance.h" | 25 #include "ppapi/c/pp_instance.h" |
| 27 #include "ppapi/c/pp_rect.h" | 26 #include "ppapi/c/pp_rect.h" |
| 28 #include "ppapi/c/pp_resource.h" | 27 #include "ppapi/c/pp_resource.h" |
| 29 #include "ppapi/c/pp_var.h" | 28 #include "ppapi/c/pp_var.h" |
| 30 #include "ppapi/c/ppb_core.h" | 29 #include "ppapi/c/ppb_core.h" |
| 31 #include "ppapi/c/ppb_instance.h" | 30 #include "ppapi/c/ppb_instance.h" |
| 32 #include "ppapi/c/ppp_input_event.h" | 31 #include "ppapi/c/ppp_input_event.h" |
| 33 #include "ppapi/c/ppp_instance.h" | 32 #include "ppapi/c/ppp_instance.h" |
| 34 #include "ppapi/c/ppp_messaging.h" | 33 #include "ppapi/c/ppp_messaging.h" |
| 34 #include "ppapi/c/ppp_mouse_lock.h" |
| 35 #include "ppapi/c/private/ppb_instance_private.h" | 35 #include "ppapi/c/private/ppb_instance_private.h" |
| 36 #include "ppapi/c/private/ppp_instance_private.h" | 36 #include "ppapi/c/private/ppp_instance_private.h" |
| 37 #include "ppapi/shared_impl/input_event_impl.h" | 37 #include "ppapi/shared_impl/input_event_impl.h" |
| 38 #include "ppapi/shared_impl/resource.h" | 38 #include "ppapi/shared_impl/resource.h" |
| 39 #include "ppapi/shared_impl/time_conversion.h" | 39 #include "ppapi/shared_impl/time_conversion.h" |
| 40 #include "ppapi/shared_impl/url_util_impl.h" | 40 #include "ppapi/shared_impl/url_util_impl.h" |
| 41 #include "ppapi/shared_impl/var.h" | 41 #include "ppapi/shared_impl/var.h" |
| 42 #include "ppapi/thunk/enter.h" | 42 #include "ppapi/thunk/enter.h" |
| 43 #include "ppapi/thunk/ppb_buffer_api.h" | 43 #include "ppapi/thunk/ppb_buffer_api.h" |
| 44 #include "printing/units.h" | 44 #include "printing/units.h" |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 plugin_messaging_interface_ = | 959 plugin_messaging_interface_ = |
| 960 static_cast<const PPP_Messaging*>(module_->GetPluginInterface( | 960 static_cast<const PPP_Messaging*>(module_->GetPluginInterface( |
| 961 PPP_MESSAGING_INTERFACE_1_0)); | 961 PPP_MESSAGING_INTERFACE_1_0)); |
| 962 } | 962 } |
| 963 return !!plugin_messaging_interface_; | 963 return !!plugin_messaging_interface_; |
| 964 } | 964 } |
| 965 | 965 |
| 966 bool PluginInstance::LoadMouseLockInterface() { | 966 bool PluginInstance::LoadMouseLockInterface() { |
| 967 if (!plugin_mouse_lock_interface_) { | 967 if (!plugin_mouse_lock_interface_) { |
| 968 plugin_mouse_lock_interface_ = | 968 plugin_mouse_lock_interface_ = |
| 969 static_cast<const PPP_MouseLock_Dev*>(module_->GetPluginInterface( | 969 static_cast<const PPP_MouseLock*>(module_->GetPluginInterface( |
| 970 PPP_MOUSELOCK_DEV_INTERFACE)); | 970 PPP_MOUSELOCK_INTERFACE)); |
| 971 } | 971 } |
| 972 | 972 |
| 973 return !!plugin_mouse_lock_interface_; | 973 return !!plugin_mouse_lock_interface_; |
| 974 } | 974 } |
| 975 | 975 |
| 976 bool PluginInstance::LoadPdfInterface() { | 976 bool PluginInstance::LoadPdfInterface() { |
| 977 if (!plugin_pdf_interface_) { | 977 if (!plugin_pdf_interface_) { |
| 978 plugin_pdf_interface_ = | 978 plugin_pdf_interface_ = |
| 979 static_cast<const PPP_Pdf*>(module_->GetPluginInterface( | 979 static_cast<const PPP_Pdf*>(module_->GetPluginInterface( |
| 980 PPP_PDF_INTERFACE)); | 980 PPP_PDF_INTERFACE)); |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2064 screen_size_for_fullscreen_ = gfx::Size(); | 2064 screen_size_for_fullscreen_ = gfx::Size(); |
| 2065 WebElement element = container_->element(); | 2065 WebElement element = container_->element(); |
| 2066 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2066 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2067 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2067 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2068 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2068 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2069 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2069 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2070 } | 2070 } |
| 2071 | 2071 |
| 2072 } // namespace ppapi | 2072 } // namespace ppapi |
| 2073 } // namespace webkit | 2073 } // namespace webkit |
| OLD | NEW |