| 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 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1844 try_catch.SetException("Exception caught"); | 1845 try_catch.SetException("Exception caught"); |
| 1845 WebBindings::releaseVariantValue(&result); | 1846 WebBindings::releaseVariantValue(&result); |
| 1846 return PP_MakeUndefined(); | 1847 return PP_MakeUndefined(); |
| 1847 } | 1848 } |
| 1848 | 1849 |
| 1849 PP_Var ret = NPVariantToPPVar(this, &result); | 1850 PP_Var ret = NPVariantToPPVar(this, &result); |
| 1850 WebBindings::releaseVariantValue(&result); | 1851 WebBindings::releaseVariantValue(&result); |
| 1851 return ret; | 1852 return ret; |
| 1852 } | 1853 } |
| 1853 | 1854 |
| 1855 uint32_t PluginInstance::GetAudioHardwareOutputSampleRate( |
| 1856 PP_Instance instance) { |
| 1857 return delegate()->GetAudioHardwareOutputSampleRate(); |
| 1858 } |
| 1859 |
| 1860 uint32_t PluginInstance::GetAudioHardwareOutputBufferSize( |
| 1861 PP_Instance instance) { |
| 1862 return delegate()->GetAudioHardwareOutputBufferSize(); |
| 1863 } |
| 1864 |
| 1854 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) { | 1865 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) { |
| 1855 std::string encoding = delegate()->GetDefaultEncoding(); | 1866 std::string encoding = delegate()->GetDefaultEncoding(); |
| 1856 return StringVar::StringToPPVar(encoding); | 1867 return StringVar::StringToPPVar(encoding); |
| 1857 } | 1868 } |
| 1858 | 1869 |
| 1859 void PluginInstance::NumberOfFindResultsChanged(PP_Instance instance, | 1870 void PluginInstance::NumberOfFindResultsChanged(PP_Instance instance, |
| 1860 int32_t total, | 1871 int32_t total, |
| 1861 PP_Bool final_result) { | 1872 PP_Bool final_result) { |
| 1862 DCHECK_NE(find_identifier_, -1); | 1873 DCHECK_NE(find_identifier_, -1); |
| 1863 delegate_->NumberOfFindResultsChanged(find_identifier_, total, | 1874 delegate_->NumberOfFindResultsChanged(find_identifier_, total, |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2086 screen_size_for_fullscreen_ = gfx::Size(); | 2097 screen_size_for_fullscreen_ = gfx::Size(); |
| 2087 WebElement element = container_->element(); | 2098 WebElement element = container_->element(); |
| 2088 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2099 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2089 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2100 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2090 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2101 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2091 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2102 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2092 } | 2103 } |
| 2093 | 2104 |
| 2094 } // namespace ppapi | 2105 } // namespace ppapi |
| 2095 } // namespace webkit | 2106 } // namespace webkit |
| OLD | NEW |