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::AudioHardwareOutputSampleRate(PP_Instance instance) { |
| 1856 return delegate()->AudioHardwareOutputSampleRate(); |
| 1857 } |
| 1858 |
| 1859 uint32_t PluginInstance::AudioHardwareOutputBufferSize(PP_Instance instance) { |
| 1860 return delegate()->AudioHardwareOutputBufferSize(); |
| 1861 } |
| 1862 |
1854 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) { | 1863 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) { |
1855 std::string encoding = delegate()->GetDefaultEncoding(); | 1864 std::string encoding = delegate()->GetDefaultEncoding(); |
1856 return StringVar::StringToPPVar(encoding); | 1865 return StringVar::StringToPPVar(encoding); |
1857 } | 1866 } |
1858 | 1867 |
1859 void PluginInstance::NumberOfFindResultsChanged(PP_Instance instance, | 1868 void PluginInstance::NumberOfFindResultsChanged(PP_Instance instance, |
1860 int32_t total, | 1869 int32_t total, |
1861 PP_Bool final_result) { | 1870 PP_Bool final_result) { |
1862 DCHECK_NE(find_identifier_, -1); | 1871 DCHECK_NE(find_identifier_, -1); |
1863 delegate_->NumberOfFindResultsChanged(find_identifier_, total, | 1872 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(); | 2095 screen_size_for_fullscreen_ = gfx::Size(); |
2087 WebElement element = container_->element(); | 2096 WebElement element = container_->element(); |
2088 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2097 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
2089 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2098 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
2090 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2099 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
2091 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2100 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
2092 } | 2101 } |
2093 | 2102 |
2094 } // namespace ppapi | 2103 } // namespace ppapi |
2095 } // namespace webkit | 2104 } // namespace webkit |
OLD | NEW |