Index: webkit/common/plugins/ppapi/ppapi_utils.cc |
=================================================================== |
--- webkit/common/plugins/ppapi/ppapi_utils.cc (revision 0) |
+++ webkit/common/plugins/ppapi/ppapi_utils.cc (revision 0) |
@@ -0,0 +1,182 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+#include "webkit/common/plugins/ppapi/ppapi_utils.h" |
+#include <cstring> |
yzshen1
2013/05/21 21:42:33
nit: an empty line above line 5.
|
+ |
+#include "base/bind.h" |
yzshen1
2013/05/21 21:42:33
You don't need some of the includes.
Please remove
ananta
2013/05/21 22:21:15
Done.
|
+#include "base/message_loop.h" |
+#include "ppapi/c/dev/ppb_audio_input_dev.h" |
+#include "ppapi/c/dev/ppb_buffer_dev.h" |
+#include "ppapi/c/dev/ppb_char_set_dev.h" |
+#include "ppapi/c/dev/ppb_crypto_dev.h" |
+#include "ppapi/c/dev/ppb_cursor_control_dev.h" |
+#include "ppapi/c/dev/ppb_device_ref_dev.h" |
+#include "ppapi/c/dev/ppb_file_chooser_dev.h" |
+#include "ppapi/c/dev/ppb_find_dev.h" |
+#include "ppapi/c/dev/ppb_font_dev.h" |
+#include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" |
+#include "ppapi/c/dev/ppb_graphics_2d_dev.h" |
+#include "ppapi/c/dev/ppb_ime_input_event_dev.h" |
+#include "ppapi/c/dev/ppb_keyboard_input_event_dev.h" |
+#include "ppapi/c/dev/ppb_memory_dev.h" |
+#include "ppapi/c/dev/ppb_opengles2ext_dev.h" |
+#include "ppapi/c/dev/ppb_printing_dev.h" |
+#include "ppapi/c/dev/ppb_resource_array_dev.h" |
+#include "ppapi/c/dev/ppb_scrollbar_dev.h" |
+#include "ppapi/c/dev/ppb_testing_dev.h" |
+#include "ppapi/c/dev/ppb_text_input_dev.h" |
+#include "ppapi/c/dev/ppb_trace_event_dev.h" |
+#include "ppapi/c/dev/ppb_truetype_font_dev.h" |
+#include "ppapi/c/dev/ppb_url_util_dev.h" |
+#include "ppapi/c/dev/ppb_var_array_dev.h" |
+#include "ppapi/c/dev/ppb_var_deprecated.h" |
+#include "ppapi/c/dev/ppb_var_dictionary_dev.h" |
+#include "ppapi/c/dev/ppb_video_capture_dev.h" |
+#include "ppapi/c/dev/ppb_video_decoder_dev.h" |
+#include "ppapi/c/dev/ppb_view_dev.h" |
+#include "ppapi/c/dev/ppb_widget_dev.h" |
+#include "ppapi/c/dev/ppb_zoom_dev.h" |
+#include "ppapi/c/extensions/dev/ppb_ext_alarms_dev.h" |
+#include "ppapi/c/extensions/dev/ppb_ext_socket_dev.h" |
+#include "ppapi/c/ppb_audio.h" |
+#include "ppapi/c/ppb_audio_config.h" |
+#include "ppapi/c/ppb_core.h" |
+#include "ppapi/c/ppb_file_io.h" |
+#include "ppapi/c/ppb_file_ref.h" |
+#include "ppapi/c/ppb_file_system.h" |
+#include "ppapi/c/ppb_fullscreen.h" |
+#include "ppapi/c/ppb_gamepad.h" |
+#include "ppapi/c/ppb_graphics_2d.h" |
+#include "ppapi/c/ppb_graphics_3d.h" |
+#include "ppapi/c/ppb_image_data.h" |
+#include "ppapi/c/ppb_input_event.h" |
+#include "ppapi/c/ppb_instance.h" |
+#include "ppapi/c/ppb_messaging.h" |
+#include "ppapi/c/ppb_mouse_cursor.h" |
+#include "ppapi/c/ppb_mouse_lock.h" |
+#include "ppapi/c/ppb_url_loader.h" |
+#include "ppapi/c/ppb_url_request_info.h" |
+#include "ppapi/c/ppb_url_response_info.h" |
+#include "ppapi/c/ppb_var.h" |
+#include "ppapi/c/ppb_var_array_buffer.h" |
+#include "ppapi/c/ppb_view.h" |
+#include "ppapi/c/ppb_websocket.h" |
+#include "ppapi/c/private/ppb_content_decryptor_private.h" |
+#include "ppapi/c/private/ppb_ext_crx_file_system_private.h" |
+#include "ppapi/c/private/ppb_file_io_private.h" |
+#include "ppapi/c/private/ppb_file_ref_private.h" |
+#include "ppapi/c/private/ppb_flash.h" |
+#include "ppapi/c/private/ppb_flash_clipboard.h" |
+#include "ppapi/c/private/ppb_flash_device_id.h" |
+#include "ppapi/c/private/ppb_flash_file.h" |
+#include "ppapi/c/private/ppb_flash_font_file.h" |
+#include "ppapi/c/private/ppb_flash_fullscreen.h" |
+#include "ppapi/c/private/ppb_flash_menu.h" |
+#include "ppapi/c/private/ppb_flash_message_loop.h" |
+#include "ppapi/c/private/ppb_flash_print.h" |
+#include "ppapi/c/private/ppb_gpu_blacklist_private.h" |
+#include "ppapi/c/private/ppb_host_resolver_private.h" |
+#include "ppapi/c/private/ppb_network_list_private.h" |
+#include "ppapi/c/private/ppb_network_monitor_private.h" |
+#include "ppapi/c/private/ppb_pdf.h" |
+#include "ppapi/c/private/ppb_proxy_private.h" |
+#include "ppapi/c/private/ppb_talk_private.h" |
+#include "ppapi/c/private/ppb_tcp_server_socket_private.h" |
+#include "ppapi/c/private/ppb_tcp_socket_private.h" |
+#include "ppapi/c/private/ppb_udp_socket_private.h" |
+#include "ppapi/c/private/ppb_uma_private.h" |
+#include "ppapi/c/private/ppb_video_destination_private.h" |
+#include "ppapi/c/private/ppb_video_source_private.h" |
+#include "ppapi/c/private/ppb_x509_certificate_private.h" |
+#include "ppapi/c/trusted/ppb_broker_trusted.h" |
+#include "ppapi/c/trusted/ppb_browser_font_trusted.h" |
+#include "ppapi/c/trusted/ppb_char_set_trusted.h" |
+#include "ppapi/c/trusted/ppb_file_chooser_trusted.h" |
+#include "ppapi/c/trusted/ppb_file_io_trusted.h" |
+#include "ppapi/c/trusted/ppb_url_loader_trusted.h" |
+#include "ppapi/shared_impl/ppapi_globals.h" |
+#include "ppapi/shared_impl/resource_tracker.h" |
+#include "ppapi/shared_impl/time_conversion.h" |
+#include "ppapi/thunk/thunk.h" |
+ |
+namespace webkit { |
+namespace ppapi { |
+ |
+bool IsSupportedPepperInterface(const char* name) { |
+ // TODO(ananta) |
+ // Most of this code is a duplicate of the InternalGetInterface function in |
+ // ppapi/plugin_module.cc. The InternalGetInterface function refers to files |
+ // inside plugins/ppapi, which is the reason for this duplication. |
+ // Needs to be looked at. |
+ |
+ // TODO(brettw) put these in a hash map for better performance. |
+ #define UNPROXIED_IFACE(api_name, iface_str, iface_struct) \ |
+ if (strcmp(name, iface_str) == 0) \ |
+ return true; |
+ #define PROXIED_IFACE(api_name, iface_str, iface_struct) \ |
+ UNPROXIED_IFACE(api_name, iface_str, iface_struct) |
+ |
+ #include "ppapi/thunk/interfaces_ppb_private.h" |
+ #include "ppapi/thunk/interfaces_ppb_private_flash.h" |
+ #include "ppapi/thunk/interfaces_ppb_private_no_permissions.h" |
+ #include "ppapi/thunk/interfaces_ppb_public_dev.h" |
+ #include "ppapi/thunk/interfaces_ppb_public_stable.h" |
+ |
+ #undef UNPROXIED_API |
+ #undef PROXIED_IFACE |
+ |
+ // Please keep alphabetized by interface macro name with "special" stuff at |
+ // the bottom. |
+ if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE_0_6) == 0) |
+ return true; |
+ if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE_0_1) == 0) |
+ return true; |
+ if (strcmp(name, PPB_CORE_INTERFACE_1_0) == 0) |
+ return true; |
+ if (strcmp(name, PPB_GPUBLACKLIST_PRIVATE_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE_1_0) == 0) |
+ return true; |
+ if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4) == 0) |
+ return true; |
+ if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) |
+ return true; |
+ if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE_0_1) == 0) |
+ return true; |
+ if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE_1_0) == 0) |
+ return true; |
+ if (strcmp(name, PPB_OPENGLES2_QUERY_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) |
+ return true; |
+ if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) |
+ return true; |
+ if (strcmp(name, PPB_VAR_INTERFACE_1_1) == 0) |
+ return true; |
+ if (strcmp(name, PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0) == 0) |
+ return true; |
+ // If you add additional strcmp's here please add them to the |
yzshen1
2013/05/21 21:42:33
It seems this comment belongs to plugin_module.cc
ananta
2013/05/21 22:21:15
Done.
|
+ // IsSupportedPepperInterface function |
+ // in webkit/common/plugins/ppapi/ppapi_utils.cc |
+ return false; |
+} |
+ |
+} // namespace ppapi |
+} // namespace webkit |
Property changes on: webkit\common\plugins\ppapi\ppapi_utils.cc |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |