| 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 "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/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
| 13 #include "base/utf_offset_string_conversions.h" | 13 #include "base/utf_offset_string_conversions.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "ppapi/c/dev/ppb_find_dev.h" | 15 #include "ppapi/c/dev/ppb_find_dev.h" |
| 16 #include "ppapi/c/dev/ppb_gamepad_dev.h" | 16 #include "ppapi/c/dev/ppb_gamepad_dev.h" |
| 17 #include "ppapi/c/dev/ppb_zoom_dev.h" | 17 #include "ppapi/c/dev/ppb_zoom_dev.h" |
| 18 #include "ppapi/c/dev/ppp_find_dev.h" | 18 #include "ppapi/c/dev/ppp_find_dev.h" |
| 19 #include "ppapi/c/dev/ppp_selection_dev.h" | 19 #include "ppapi/c/dev/ppp_selection_dev.h" |
| 20 #include "ppapi/c/dev/ppp_zoom_dev.h" | 20 #include "ppapi/c/dev/ppp_zoom_dev.h" |
| 21 #include "ppapi/c/pp_rect.h" | 21 #include "ppapi/c/pp_rect.h" |
| 22 #include "ppapi/c/ppb_audio_config.h" |
| 22 #include "ppapi/c/ppb_core.h" | 23 #include "ppapi/c/ppb_core.h" |
| 23 #include "ppapi/c/ppp_input_event.h" | 24 #include "ppapi/c/ppp_input_event.h" |
| 24 #include "ppapi/c/ppp_instance.h" | 25 #include "ppapi/c/ppp_instance.h" |
| 25 #include "ppapi/c/ppp_messaging.h" | 26 #include "ppapi/c/ppp_messaging.h" |
| 26 #include "ppapi/c/ppp_mouse_lock.h" | 27 #include "ppapi/c/ppp_mouse_lock.h" |
| 27 #include "ppapi/c/private/ppp_instance_private.h" | 28 #include "ppapi/c/private/ppp_instance_private.h" |
| 28 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 29 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 29 #include "ppapi/shared_impl/ppb_url_util_shared.h" | 30 #include "ppapi/shared_impl/ppb_url_util_shared.h" |
| 30 #include "ppapi/shared_impl/ppb_view_shared.h" | 31 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 31 #include "ppapi/shared_impl/ppp_instance_combined.h" | 32 #include "ppapi/shared_impl/ppp_instance_combined.h" |
| (...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1845 try_catch.SetException("Exception caught"); | 1846 try_catch.SetException("Exception caught"); |
| 1846 WebBindings::releaseVariantValue(&result); | 1847 WebBindings::releaseVariantValue(&result); |
| 1847 return PP_MakeUndefined(); | 1848 return PP_MakeUndefined(); |
| 1848 } | 1849 } |
| 1849 | 1850 |
| 1850 PP_Var ret = NPVariantToPPVar(this, &result); | 1851 PP_Var ret = NPVariantToPPVar(this, &result); |
| 1851 WebBindings::releaseVariantValue(&result); | 1852 WebBindings::releaseVariantValue(&result); |
| 1852 return ret; | 1853 return ret; |
| 1853 } | 1854 } |
| 1854 | 1855 |
| 1856 uint32_t PluginInstance::GetAudioHardwareOutputSampleRate( |
| 1857 PP_Instance instance) { |
| 1858 return delegate()->GetAudioHardwareOutputSampleRate(); |
| 1859 } |
| 1860 |
| 1861 uint32_t PluginInstance::GetAudioHardwareOutputBufferSize( |
| 1862 PP_Instance instance) { |
| 1863 return delegate()->GetAudioHardwareOutputBufferSize(); |
| 1864 } |
| 1865 |
| 1855 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) { | 1866 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) { |
| 1856 std::string encoding = delegate()->GetDefaultEncoding(); | 1867 std::string encoding = delegate()->GetDefaultEncoding(); |
| 1857 return StringVar::StringToPPVar(encoding); | 1868 return StringVar::StringToPPVar(encoding); |
| 1858 } | 1869 } |
| 1859 | 1870 |
| 1860 PP_Var PluginInstance::GetFontFamilies(PP_Instance instance) { | 1871 PP_Var PluginInstance::GetFontFamilies(PP_Instance instance) { |
| 1861 // No in-process implementation. | 1872 // No in-process implementation. |
| 1862 return PP_MakeUndefined(); | 1873 return PP_MakeUndefined(); |
| 1863 } | 1874 } |
| 1864 | 1875 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 screen_size_for_fullscreen_ = gfx::Size(); | 2103 screen_size_for_fullscreen_ = gfx::Size(); |
| 2093 WebElement element = container_->element(); | 2104 WebElement element = container_->element(); |
| 2094 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2105 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2095 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2106 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2096 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2107 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2097 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2108 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2098 } | 2109 } |
| 2099 | 2110 |
| 2100 } // namespace ppapi | 2111 } // namespace ppapi |
| 2101 } // namespace webkit | 2112 } // namespace webkit |
| OLD | NEW |