| 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 "ppapi/proxy/plugin_dispatcher.h" | 5 #include "ppapi/proxy/plugin_dispatcher.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "ipc/ipc_message.h" | 12 #include "ipc/ipc_message.h" |
| 13 #include "ipc/ipc_sync_channel.h" | 13 #include "ipc/ipc_sync_channel.h" |
| 14 #include "base/debug/trace_event.h" | 14 #include "base/debug/trace_event.h" |
| 15 #include "ppapi/c/pp_errors.h" | 15 #include "ppapi/c/pp_errors.h" |
| 16 #include "ppapi/proxy/interface_proxy.h" | 16 #include "ppapi/proxy/interface_proxy.h" |
| 17 #include "ppapi/proxy/plugin_message_filter.h" | 17 #include "ppapi/proxy/plugin_message_filter.h" |
| 18 #include "ppapi/proxy/plugin_resource_tracker.h" | 18 #include "ppapi/proxy/plugin_resource_tracker.h" |
| 19 #include "ppapi/proxy/plugin_var_serialization_rules.h" | 19 #include "ppapi/proxy/plugin_var_serialization_rules.h" |
| 20 #include "ppapi/proxy/ppapi_messages.h" | 20 #include "ppapi/proxy/ppapi_messages.h" |
| 21 #include "ppapi/proxy/ppb_char_set_proxy.h" | 21 #include "ppapi/proxy/ppb_char_set_proxy.h" |
| 22 #include "ppapi/proxy/ppb_cursor_control_proxy.h" | 22 #include "ppapi/proxy/ppb_cursor_control_proxy.h" |
| 23 #include "ppapi/proxy/ppb_font_proxy.h" | 23 #include "ppapi/proxy/ppb_font_proxy.h" |
| 24 #include "ppapi/proxy/ppb_ime_control_proxy.h" |
| 24 #include "ppapi/proxy/ppb_instance_proxy.h" | 25 #include "ppapi/proxy/ppb_instance_proxy.h" |
| 25 #include "ppapi/proxy/ppp_class_proxy.h" | 26 #include "ppapi/proxy/ppp_class_proxy.h" |
| 26 #include "ppapi/proxy/resource_creation_proxy.h" | 27 #include "ppapi/proxy/resource_creation_proxy.h" |
| 27 #include "ppapi/shared_impl/resource.h" | 28 #include "ppapi/shared_impl/resource.h" |
| 28 #include "ppapi/shared_impl/tracker_base.h" | 29 #include "ppapi/shared_impl/tracker_base.h" |
| 29 | 30 |
| 30 #if defined(OS_POSIX) | 31 #if defined(OS_POSIX) |
| 31 #include "base/eintr_wrapper.h" | 32 #include "base/eintr_wrapper.h" |
| 32 #include "ipc/ipc_channel_posix.h" | 33 #include "ipc/ipc_channel_posix.h" |
| 33 #endif | 34 #endif |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 239 |
| 239 if (proxy.get()) | 240 if (proxy.get()) |
| 240 return proxy.get(); | 241 return proxy.get(); |
| 241 | 242 |
| 242 if (id == INTERFACE_ID_PPB_CHAR_SET) | 243 if (id == INTERFACE_ID_PPB_CHAR_SET) |
| 243 proxy.reset(new PPB_CharSet_Proxy(this, NULL)); | 244 proxy.reset(new PPB_CharSet_Proxy(this, NULL)); |
| 244 else if(id == INTERFACE_ID_PPB_CURSORCONTROL) | 245 else if(id == INTERFACE_ID_PPB_CURSORCONTROL) |
| 245 proxy.reset(new PPB_CursorControl_Proxy(this, NULL)); | 246 proxy.reset(new PPB_CursorControl_Proxy(this, NULL)); |
| 246 else if (id == INTERFACE_ID_PPB_FONT) | 247 else if (id == INTERFACE_ID_PPB_FONT) |
| 247 proxy.reset(new PPB_Font_Proxy(this, NULL)); | 248 proxy.reset(new PPB_Font_Proxy(this, NULL)); |
| 249 else if(id == INTERFACE_ID_PPB_IMECONTROL) |
| 250 proxy.reset(new PPB_IMEControl_Proxy(this, NULL)); |
| 248 else if (id == INTERFACE_ID_PPB_INSTANCE) | 251 else if (id == INTERFACE_ID_PPB_INSTANCE) |
| 249 proxy.reset(new PPB_Instance_Proxy(this, NULL)); | 252 proxy.reset(new PPB_Instance_Proxy(this, NULL)); |
| 250 else if (id == INTERFACE_ID_RESOURCE_CREATION) | 253 else if (id == INTERFACE_ID_RESOURCE_CREATION) |
| 251 proxy.reset(new ResourceCreationProxy(this)); | 254 proxy.reset(new ResourceCreationProxy(this)); |
| 252 | 255 |
| 253 return proxy.get(); | 256 return proxy.get(); |
| 254 } | 257 } |
| 255 | 258 |
| 256 void PluginDispatcher::ForceFreeAllInstances() { | 259 void PluginDispatcher::ForceFreeAllInstances() { |
| 257 if (!g_instance_to_dispatcher) | 260 if (!g_instance_to_dispatcher) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // once they're set. The user will have to restart to get new font prefs | 309 // once they're set. The user will have to restart to get new font prefs |
| 307 // propogated to plugins. | 310 // propogated to plugins. |
| 308 if (!received_preferences_) { | 311 if (!received_preferences_) { |
| 309 received_preferences_ = true; | 312 received_preferences_ = true; |
| 310 preferences_ = prefs; | 313 preferences_ = prefs; |
| 311 } | 314 } |
| 312 } | 315 } |
| 313 | 316 |
| 314 } // namespace proxy | 317 } // namespace proxy |
| 315 } // namespace ppapi | 318 } // namespace ppapi |
| OLD | NEW |