trace_info("[PPB] {zilch} %s instance=%d\n", __func__+6, instance); return ppb_flash_get_device_id(instance); } TRACE_WRAPPER int32_t trace_ppb_flash_get_setting_int(PP_Instance instance, PP_FlashSetting setting) { trace_info("[PPB] {zilch} %s instance=%d, setting=%s\n", __func__+6, instance, reverse_pp_flash_setting(setting)); return ppb_flash_get_setting_int(instance, setting); } const struct PPB_Flash_13_0 ppb_flash_interface_13_0 = { .SetInstanceAlwaysOnTop = TWRAPZ(ppb_flash_set_instance_always_on_top), .DrawGlyphs = TWRAPF(ppb_flash_draw_glyphs), .GetProxyForURL = TWRAPF(ppb_flash_get_proxy_for_url), .Navigate = TWRAPF(ppb_flash_navigate), .GetLocalTimeZoneOffset = TWRAPF(ppb_flash_get_local_time_zone_offset), .GetCommandLineArgs = TWRAPF(ppb_flash_get_command_line_args), .PreloadFontWin = TWRAPZ(ppb_flash_preload_font_win), .IsRectTopmost = TWRAPF(ppb_flash_is_rect_topmost), .UpdateActivity = TWRAPF(ppb_flash_update_activity), .GetSetting = TWRAPF(ppb_flash_get_setting), .SetCrashData = TWRAPF(ppb_flash_set_crash_data), .EnumerateVideoCaptureDevices = TWRAPF(ppb_flash_enumerate_video_capture_devices), }; const struct PPB_Flash_12_6 ppb_flash_interface_12_6 = { .SetInstanceAlwaysOnTop = TWRAPZ(ppb_flash_set_instance_always_on_top),
.GetScrollByPage = TWRAPF(ppb_wheel_input_event_get_scroll_by_page), }; const struct PPB_KeyboardInputEvent_1_0 ppb_keyboard_input_event_interface_1_0 = { .Create = TWRAPF(ppb_keyboard_input_event_create_1_0), .IsKeyboardInputEvent = TWRAPF(ppb_keyboard_input_event_is_keyboard_input_event), .GetKeyCode = TWRAPF(ppb_keyboard_input_event_get_key_code), .GetCharacterText = TWRAPF(ppb_keyboard_input_event_get_character_text), }; const struct PPB_KeyboardInputEvent_1_2 ppb_keyboard_input_event_interface_1_2 = { .Create = TWRAPF(ppb_keyboard_input_event_create_1_2), .IsKeyboardInputEvent = TWRAPF(ppb_keyboard_input_event_is_keyboard_input_event), .GetKeyCode = TWRAPF(ppb_keyboard_input_event_get_key_code), .GetCharacterText = TWRAPF(ppb_keyboard_input_event_get_character_text), .GetCode = TWRAPZ(ppb_keyboard_input_event_get_code), }; const struct PPB_TouchInputEvent_1_0 ppb_touch_input_event_interface_1_0 = { .Create = TWRAPZ(ppb_touch_input_event_create), .AddTouchPoint = TWRAPZ(ppb_touch_input_event_add_touch_point), .IsTouchInputEvent = TWRAPZ(ppb_touch_input_event_is_touch_input_event), .GetTouchCount = TWRAPZ(ppb_touch_input_event_get_touch_count), .GetTouchByIndex = TWRAPZ(ppb_touch_input_event_get_touch_by_index), .GetTouchById = TWRAPZ(ppb_touch_input_event_get_touch_by_id), }; const struct PPB_IMEInputEvent_Dev_0_2 ppb_ime_input_event_dev_interface_0_2 = { .Create = TWRAPF(ppb_ime_input_event_create), .IsIMEInputEvent = TWRAPF(ppb_ime_input_event_is_ime_input_event), .GetText = TWRAPF(ppb_ime_input_event_get_text),
int32_t min, int32_t max, uint32_t bucket_count) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_uma_histogram_custom_counts(instance, name, sample, min, max, bucket_count); } TRACE_WRAPPER void trace_ppb_uma_histogram_enumeration(PP_Instance instance, struct PP_Var name, int32_t sample, int32_t boundary_value) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_uma_histogram_enumeration(instance, name, sample, boundary_value); } TRACE_WRAPPER int32_t trace_ppb_uma_is_crash_reporting_enabled(PP_Instance instance, struct PP_CompletionCallback callback) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_uma_is_crash_reporting_enabled(instance, callback); } const struct PPB_UMA_Private_0_3 ppb_uma_private_interface_0_3 = { .HistogramCustomTimes = TWRAPZ(ppb_uma_histogram_custom_times), .HistogramCustomCounts = TWRAPZ(ppb_uma_histogram_custom_counts), .HistogramEnumeration = TWRAPZ(ppb_uma_histogram_enumeration), .IsCrashReportingEnabled = TWRAPZ(ppb_uma_is_crash_reporting_enabled), };
ppb_url_loader_trusted_grant_universal_access(loader); } TRACE_WRAPPER void trace_ppb_url_loader_trusted_register_status_callback(PP_Resource loader, PP_URLLoaderTrusted_StatusCallback cb) { trace_info("[PPB] {zilch} %s loader=%d, cb=%p\n", __func__+6, loader, cb); ppb_url_loader_trusted_register_status_callback(loader, cb); } const struct PPB_URLLoader_1_0 ppb_url_loader_interface_1_0 = { .Create = TWRAPF(ppb_url_loader_create), .IsURLLoader = TWRAPF(ppb_url_loader_is_url_loader), .Open = TWRAPF(ppb_url_loader_open), .FollowRedirect = TWRAPF(ppb_url_loader_follow_redirect), .GetUploadProgress = TWRAPZ(ppb_url_loader_get_upload_progress), .GetDownloadProgress = TWRAPF(ppb_url_loader_get_download_progress), .GetResponseInfo = TWRAPF(ppb_url_loader_get_response_info), .ReadResponseBody = TWRAPF(ppb_url_loader_read_response_body), .FinishStreamingToFile = TWRAPF(ppb_url_loader_finish_streaming_to_file), .Close = TWRAPF(ppb_url_loader_close), }; const struct PPB_URLLoaderTrusted_0_3 ppb_url_loader_trusted_interface_0_3 = { .GrantUniversalAccess = TWRAPZ(ppb_url_loader_trusted_grant_universal_access), .RegisterStatusCallback = TWRAPZ(ppb_url_loader_trusted_register_status_callback), };
} const struct PPB_URLLoader_1_0 ppb_url_loader_interface_1_0 = { .Create = TWRAPF(ppb_url_loader_create), .IsURLLoader = TWRAPF(ppb_url_loader_is_url_loader), .Open = TWRAPF(ppb_url_loader_open), .FollowRedirect = TWRAPF(ppb_url_loader_follow_redirect), .GetUploadProgress = TWRAPF(ppb_url_loader_get_upload_progress), .GetDownloadProgress = TWRAPF(ppb_url_loader_get_download_progress), .GetResponseInfo = TWRAPF(ppb_url_loader_get_response_info), .ReadResponseBody = TWRAPF(ppb_url_loader_read_response_body), .FinishStreamingToFile = TWRAPF(ppb_url_loader_finish_streaming_to_file), .Close = TWRAPF(ppb_url_loader_close), }; const struct PPB_URLLoaderTrusted_0_3 ppb_url_loader_trusted_interface_0_3 = { .GrantUniversalAccess = TWRAPF(ppb_url_loader_grant_universal_access), .RegisterStatusCallback = TWRAPZ(ppb_url_loader_register_status_callback), }; static void __attribute__((constructor)) constructor_ppb_url_loader(void) { register_interface(PPB_URLLOADER_INTERFACE_1_0, &ppb_url_loader_interface_1_0); register_interface(PPB_URLLOADERTRUSTED_INTERFACE_0_3, &ppb_url_loader_trusted_interface_0_3); register_resource(PP_RESOURCE_URL_LOADER, ppb_url_loader_destroy); }
TRACE_WRAPPER void trace_ppb_zoom_zoom_changed(PP_Instance instance, double factor) { trace_info("[PPB] {zilch} %s instance=%d, factor=%f\n", __func__+6, instance, factor); return ppb_zoom_zoom_changed(instance, factor); } TRACE_WRAPPER void trace_ppb_zoom_zoom_limits_changed(PP_Instance instance, double minimum_factor, double maximum_factor) { trace_info("[PPB] {zilch} %s instance=%d, minimum_factor=%f, maximum_factor=%f\n", __func__+6, instance, minimum_factor, maximum_factor); return ppb_zoom_zoom_limits_changed(instance, minimum_factor, maximum_factor); } const struct PPB_Zoom_Dev_0_2 ppb_zoom_dev_interface_0_2 = { .ZoomChanged = TWRAPZ(ppb_zoom_zoom_changed), .ZoomLimitsChanged = TWRAPZ(ppb_zoom_zoom_limits_changed), }; static void __attribute__((constructor)) constructor_ppb_zoom(void) { register_interface(PPB_ZOOM_DEV_INTERFACE_0_2, &ppb_zoom_dev_interface_0_2); }
} TRACE_WRAPPER int32_t trace_ppb_video_capture_stop_capture(PP_Resource video_capture) { trace_info("[PPB] {full} %s video_capture=%d\n", __func__+6, video_capture); return ppb_video_capture_stop_capture(video_capture); } TRACE_WRAPPER void trace_ppb_video_capture_close(PP_Resource video_capture) { trace_info("[PPB] {full} %s video_capture=%d\n", __func__+6, video_capture); ppb_video_capture_close(video_capture); } const struct PPB_VideoCapture_Dev_0_3 ppb_video_capture_dev_interface_0_3 = { .Create = TWRAPF(ppb_video_capture_create), .IsVideoCapture = TWRAPF(ppb_video_capture_is_video_capture), .EnumerateDevices = TWRAPF(ppb_video_capture_enumerate_devices), .MonitorDeviceChange = TWRAPZ(ppb_video_capture_monitor_device_change), .Open = TWRAPF(ppb_video_capture_open), .StartCapture = TWRAPF(ppb_video_capture_start_capture), .ReuseBuffer = TWRAPF(ppb_video_capture_reuse_buffer), .StopCapture = TWRAPF(ppb_video_capture_stop_capture), .Close = TWRAPF(ppb_video_capture_close), };
{ trace_info("[PPB] {full} %s instance=%d\n", __func__+6, instance); return ppb_printing_create(instance); } TRACE_WRAPPER int32_t trace_ppb_printing_get_default_print_settings(PP_Resource resource, struct PP_PrintSettings_Dev *print_settings, struct PP_CompletionCallback callback) { trace_info("[PPB] {zilch} %s resource=%d, callback={.func=%p, .user_data=%p, .flags=%d}\n", __func__+6, resource, callback.func, callback.user_data, callback.flags); return ppb_printing_get_default_print_settings(resource, print_settings, callback); } const struct PPB_Printing_Dev_0_7 ppb_printing_dev_interface_0_7 = { .Create = TWRAPF(ppb_printing_create), .GetDefaultPrintSettings = TWRAPZ(ppb_printing_get_default_print_settings), }; static void __attribute__((constructor)) constructor_ppb_printing(void) { register_interface(PPB_PRINTING_DEV_INTERFACE_0_7, &ppb_printing_dev_interface_0_7); register_resource(PP_RESOURCE_PRINTING, ppb_printing_destroy); }
trace_ppb_buffer_dev_describe(PP_Resource resource, uint32_t *size_in_bytes) { trace_info("[PPB] {zilch} %s resource=%d\n", __func__+6, resource); return ppb_buffer_dev_describe(resource, size_in_bytes); } TRACE_WRAPPER void * trace_ppb_buffer_dev_map(PP_Resource resource) { trace_info("[PPB] {zilch} %s resource=%d\n", __func__+6, resource); return ppb_buffer_dev_map(resource); } TRACE_WRAPPER void trace_ppb_buffer_dev_unmap(PP_Resource resource) { trace_info("[PPB] {zilch} %s resource=%d\n", __func__+6, resource); ppb_buffer_dev_unmap(resource); } const struct PPB_Buffer_Dev_0_4 ppb_buffer_dev_interface_0_4 = { .Create = TWRAPZ(ppb_buffer_dev_create), .IsBuffer = TWRAPZ(ppb_buffer_dev_is_buffer), .Describe = TWRAPZ(ppb_buffer_dev_describe), .Map = TWRAPZ(ppb_buffer_dev_map), .Unmap = TWRAPZ(ppb_buffer_dev_unmap), };
user_data, handler->HandleMessage, handler->HandleBlockingMessage, handler->Destroy, message_loop); return ppb_messaging_register_message_handler(instance, user_data, handler, message_loop); } TRACE_WRAPPER void trace_ppb_messaging_unregister_message_handler(PP_Instance instance) { trace_info("[PPB] {zilch} %s instance=%d\n", __func__+6, instance); return ppb_messaging_unregister_message_handler(instance); } const struct PPB_Messaging_1_2 ppb_messaging_interface_1_2 = { .PostMessage = TWRAPZ(ppb_messaging_post_message), .RegisterMessageHandler = TWRAPZ(ppb_messaging_register_message_handler), .UnregisterMessageHandler = TWRAPZ(ppb_messaging_unregister_message_handler), }; const struct PPB_Messaging_1_0 ppb_messaging_interface_1_0 = { .PostMessage = TWRAPZ(ppb_messaging_post_message), }; static void __attribute__((constructor)) constructor_ppb_messaging(void) { register_interface(PPB_MESSAGING_INTERFACE_1_0, &ppb_messaging_interface_1_0); register_interface(PPB_MESSAGING_INTERFACE_1_2, &ppb_messaging_interface_1_2);
trace_info("[PPB] {full} %s instance=%d\n", __func__+6, instance); return ppb_url_util_dev_get_plugin_instance_url(instance, components); } TRACE_WRAPPER struct PP_Var trace_ppb_url_util_dev_get_plugin_referrer_url(PP_Instance instance, struct PP_URLComponents_Dev *components) { trace_info("[PPB] {zilch} %s instance=%d\n", __func__+6, instance); return ppb_url_util_dev_get_plugin_referrer_url(instance, components); } const struct PPB_URLUtil_Dev_0_6 ppb_url_util_dev_interface_0_6 = { .Canonicalize = TWRAPZ(ppb_url_util_dev_canonicalize), .ResolveRelativeToURL = TWRAPF(ppb_url_util_dev_resolve_relative_to_url), .ResolveRelativeToDocument = TWRAPF(ppb_url_util_dev_resolve_relative_to_document), .IsSameSecurityOrigin = TWRAPZ(ppb_url_util_dev_is_same_security_origin), .DocumentCanRequest = TWRAPZ(ppb_url_util_dev_document_can_request), .DocumentCanAccessDocument = TWRAPZ(ppb_url_util_dev_document_can_access_document), .GetDocumentURL = TWRAPF(ppb_url_util_dev_get_document_url), .GetPluginInstanceURL = TWRAPF(ppb_url_util_dev_get_plugin_instance_url), }; const struct PPB_URLUtil_Dev_0_7 ppb_url_util_dev_interface_0_7 = { .Canonicalize = TWRAPZ(ppb_url_util_dev_canonicalize), .ResolveRelativeToURL = TWRAPF(ppb_url_util_dev_resolve_relative_to_url), .ResolveRelativeToDocument = TWRAPF(ppb_url_util_dev_resolve_relative_to_document), .IsSameSecurityOrigin = TWRAPZ(ppb_url_util_dev_is_same_security_origin), .DocumentCanRequest = TWRAPZ(ppb_url_util_dev_document_can_request),
trace_ppb_cursor_control_has_cursor_lock(PP_Instance instance) { trace_info("[PPB] {zilch} %s instance=%d\n", __func__+6, instance); return ppb_cursor_control_has_cursor_lock(instance); } TRACE_WRAPPER PP_Bool trace_ppb_cursor_control_can_lock_cursor(PP_Instance instance) { trace_info("[PPB] {zilch} %s instance=%d\n", __func__+6, instance); return ppb_cursor_control_can_lock_cursor(instance); } const struct PPB_CursorControl_Dev_0_4 ppb_cursor_control_dev_interface_0_4 = { .SetCursor = TWRAPF(ppb_cursor_control_set_cursor), .LockCursor = TWRAPZ(ppb_cursor_control_lock_cursor), .UnlockCursor = TWRAPZ(ppb_cursor_control_unlock_cursor), .HasCursorLock = TWRAPZ(ppb_cursor_control_has_cursor_lock), .CanLockCursor = TWRAPZ(ppb_cursor_control_can_lock_cursor), }; static void __attribute__((constructor)) constructor_ppb_cursor_control(void) { register_interface(PPB_CURSOR_CONTROL_DEV_INTERFACE_0_4, &ppb_cursor_control_dev_interface_0_4); }
struct PP_NetAddress_Private *addr_out) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_net_address_private_create_from_ipv4_address(ip, port, addr_out); } TRACE_WRAPPER void trace_ppb_net_address_private_create_from_ipv6_address(const uint8_t ip[16], uint32_t scope_id, uint16_t port, struct PP_NetAddress_Private *addr_out) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_net_address_private_create_from_ipv6_address(ip, scope_id, port, addr_out); } const struct PPB_NetAddress_Private_1_1 ppb_net_address_private_interface_1_1 = { .AreEqual = TWRAPF(ppb_net_address_private_are_equal), .AreHostsEqual = TWRAPF(ppb_net_address_private_are_hosts_equal), .Describe = TWRAPZ(ppb_net_address_private_describe), .ReplacePort = TWRAPF(ppb_net_address_private_replace_port), .GetAnyAddress = TWRAPZ(ppb_net_address_private_get_any_address), .GetFamily = TWRAPF(ppb_net_address_private_get_family), .GetPort = TWRAPF(ppb_net_address_private_get_port), .GetAddress = TWRAPF(ppb_net_address_private_get_address), .GetScopeID = TWRAPZ(ppb_net_address_private_get_scope_id), .CreateFromIPv4Address = TWRAPZ(ppb_net_address_private_create_from_ipv4_address), .CreateFromIPv6Address = TWRAPZ(ppb_net_address_private_create_from_ipv6_address), };
TRACE_WRAPPER struct PP_Var trace_ppb_instance_private_get_owner_element_object(PP_Instance instance) { trace_info("[PPB] {zilch} %s instance=%d\n", __func__+6, instance); return ppb_instance_private_get_owner_element_object(instance); } TRACE_WRAPPER struct PP_Var trace_ppb_instance_private_execute_script(PP_Instance instance, struct PP_Var script, struct PP_Var *exception) { char *s_script = trace_var_as_string(script); trace_info("[PPB] {full} %s instance=%d, script=%s\n", __func__+6, instance, s_script); g_free(s_script); return ppb_instance_private_execute_script(instance, script, exception); } const struct PPB_Instance_1_0 ppb_instance_interface_1_0 = { .BindGraphics = TWRAPF(ppb_instance_bind_graphics), .IsFullFrame = TWRAPF(ppb_instance_is_full_frame), }; const struct PPB_Instance_Private_0_1 ppb_instance_private_interface_0_1 = { .GetWindowObject = TWRAPF(ppb_instance_private_get_window_object), .GetOwnerElementObject = TWRAPZ(ppb_instance_private_get_owner_element_object), .ExecuteScript = TWRAPF(ppb_instance_private_execute_script), };
TRACE_WRAPPER void trace_ppb_video_decoder_destroy(PP_Resource video_decoder) { trace_info("[PPB] {zilch} %s video_decoder=%d\n", __func__+6, video_decoder); return ppb_video_decoder_destroy(video_decoder); } const struct PPB_VideoDecoder_Dev_0_16 ppb_video_decoder_dev_interface_0_16 = { .Create = TWRAPF(ppb_video_decoder_create), .IsVideoDecoder = TWRAPF(ppb_video_decoder_is_video_decoder), .Decode = TWRAPF(ppb_video_decoder_decode), .AssignPictureBuffers = TWRAPF(ppb_video_decoder_assign_picture_buffers), .ReusePictureBuffer = TWRAPF(ppb_video_decoder_reuse_picture_buffer), .Flush = TWRAPF(ppb_video_decoder_flush), .Reset = TWRAPF(ppb_video_decoder_reset), .Destroy = TWRAPZ(ppb_video_decoder_destroy), }; static void __attribute__((constructor)) constructor_ppb_video_decoder(void) { avcodec_register_all(); register_interface(PPB_VIDEODECODER_DEV_INTERFACE_0_16, &ppb_video_decoder_dev_interface_0_16); register_resource(PP_RESOURCE_VIDEO_DECODER, ppb_video_decoder_destroy_priv); }
trace_ppb_network_monitor_create(PP_Instance instance) { trace_info("[PPB] {full} %s\n", __func__+6); return ppb_network_monitor_create(instance); } TRACE_WRAPPER int32_t trace_ppb_network_monitor_update_network_list(PP_Resource network_monitor, PP_Resource *network_list, struct PP_CompletionCallback callback) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_network_monitor_update_network_list(network_monitor, network_list, callback); } TRACE_WRAPPER PP_Bool trace_ppb_network_monitor_is_network_monitor(PP_Resource resource) { trace_info("[PPB] {full} %s\n", __func__+6); return ppb_network_monitor_is_network_monitor(resource); } const struct PPB_NetworkMonitor_1_0 ppb_network_monitor_interface_1_0 = { .Create = TWRAPF(ppb_network_monitor_create), .UpdateNetworkList = TWRAPZ(ppb_network_monitor_update_network_list), .IsNetworkMonitor = TWRAPF(ppb_network_monitor_is_network_monitor), };
uint32_t char_offset) { gchar *s_text = trace_var_as_string(text->text); trace_info("[PPB] {zilch} %s font=%d, text={.text=%s, .rtl=%u, .override_direction=%u}, " "char_offset=%u\n", __func__+6, font, s_text, text->rtl, text->override_direction, char_offset); g_free(s_text); return ppb_font_pixel_offset_for_character(font, text, char_offset); } const struct PPB_Font_Dev_0_6 ppb_font_dev_interface_0_6 = { .GetFontFamilies = TWRAPF(ppb_font_get_font_families), .Create = TWRAPF(ppb_font_create), .IsFont = TWRAPF(ppb_font_is_font), .Describe = TWRAPF(ppb_font_describe), .DrawTextAt = TWRAPF(ppb_font_draw_text_at), .MeasureText = TWRAPF(ppb_font_measure_text), .CharacterOffsetForPixel = TWRAPZ(ppb_font_character_offset_for_pixel), .PixelOffsetForCharacter = TWRAPZ(ppb_font_pixel_offset_for_character), }; static void __attribute__((constructor)) constructor_ppb_font(void) { register_interface(PPB_FONT_DEV_INTERFACE_0_6, &ppb_font_dev_interface_0_6); register_resource(PP_RESOURCE_FONT, ppb_font_destroy); }
TRACE_WRAPPER void trace_ppb_ime_input_event_get_selection(PP_Resource ime_event, uint32_t *start, uint32_t *end) { trace_info("[PPB] {zilch} %s ime_event=%d\n", __func__+6, ime_event); return ppb_ime_input_event_get_selection(ime_event, start, end); } const struct PPB_InputEvent_1_0 ppb_input_event_interface_1_0 = { .RequestInputEvents = TWRAPF(ppb_input_event_request_input_events), .RequestFilteringInputEvents = TWRAPF(ppb_input_event_request_filtering_input_events), .ClearInputEventRequest = TWRAPF(ppb_input_event_clear_input_event_request), .IsInputEvent = TWRAPF(ppb_input_event_is_input_event), .GetType = TWRAPF(ppb_input_event_get_type), .GetTimeStamp = TWRAPZ(ppb_input_event_get_time_stamp), .GetModifiers = TWRAPF(ppb_input_event_get_modifiers), }; const struct PPB_MouseInputEvent_1_1 ppb_mouse_input_event_interface_1_1 = { .Create = TWRAPF(ppb_mouse_input_event_create), .IsMouseInputEvent = TWRAPF(ppb_mouse_input_event_is_mouse_input_event), .GetButton = TWRAPF(ppb_mouse_input_event_get_button), .GetPosition = TWRAPF(ppb_mouse_input_event_get_position), .GetClickCount = TWRAPF(ppb_mouse_input_event_get_click_count), .GetMovement = TWRAPZ(ppb_mouse_input_event_get_movement), }; const struct PPB_WheelInputEvent_1_0 ppb_wheel_input_event_interface_1_0 = { .Create = TWRAPF(ppb_wheel_input_event_create), .IsWheelInputEvent = TWRAPF(ppb_wheel_input_event_is_wheel_input_event),
return ppb_graphics2d_set_scale(resource, scale); } TRACE_WRAPPER float trace_ppb_graphics2d_get_scale(PP_Resource resource) { trace_info("[PPB] {full} %s resource=%d\n", __func__+6, resource); return ppb_graphics2d_get_scale(resource); } const struct PPB_Graphics2D_1_0 ppb_graphics2d_interface_1_0 = { .Create = TWRAPF(ppb_graphics2d_create), .IsGraphics2D = TWRAPF(ppb_graphics2d_is_graphics2d), .Describe = TWRAPZ(ppb_graphics2d_describe), .PaintImageData = TWRAPF(ppb_graphics2d_paint_image_data), .Scroll = TWRAPZ(ppb_graphics2d_scroll), .ReplaceContents = TWRAPF(ppb_graphics2d_replace_contents), .Flush = TWRAPF(ppb_graphics2d_flush), }; const struct PPB_Graphics2D_1_1 ppb_graphics2d_interface_1_1 = { .Create = TWRAPF(ppb_graphics2d_create), .IsGraphics2D = TWRAPF(ppb_graphics2d_is_graphics2d), .Describe = TWRAPZ(ppb_graphics2d_describe), .PaintImageData = TWRAPF(ppb_graphics2d_paint_image_data), .Scroll = TWRAPZ(ppb_graphics2d_scroll), .ReplaceContents = TWRAPF(ppb_graphics2d_replace_contents), .Flush = TWRAPF(ppb_graphics2d_flush), .SetScale = TWRAPF(ppb_graphics2d_set_scale),
TRACE_WRAPPER int32_t trace_ppb_graphics3d_resize_buffers(PP_Resource context, int32_t width, int32_t height) { trace_info("[PPB] {full} %s context=%d, width=%d, height=%d\n", __func__+6, context, width, height); return ppb_graphics3d_resize_buffers(context, width, height); } TRACE_WRAPPER int32_t trace_ppb_graphics3d_swap_buffers(PP_Resource context, struct PP_CompletionCallback callback) { trace_info("[PPB] {full} %s context=%d, callback={.func=%p, .user_data=%p, .flags=%d}\n", __func__+6, context, callback.func, callback.user_data, callback.flags); return ppb_graphics3d_swap_buffers(context, callback); } const struct PPB_Graphics3D_1_0 ppb_graphics3d_interface_1_0 = { .GetAttribMaxValue = TWRAPZ(ppb_graphics3d_get_attrib_max_value), .Create = TWRAPF(ppb_graphics3d_create), .IsGraphics3D = TWRAPF(ppb_graphics3d_is_graphics3d), .GetAttribs = TWRAPZ(ppb_graphics3d_get_attribs), .SetAttribs = TWRAPZ(ppb_graphics3d_set_attribs), .GetError = TWRAPZ(ppb_graphics3d_get_error), .ResizeBuffers = TWRAPF(ppb_graphics3d_resize_buffers), .SwapBuffers = TWRAPF(ppb_graphics3d_swap_buffers), };
trace_ppb_tcp_socket_set_option(PP_Resource tcp_socket, PP_TCPSocketOption_Private name, struct PP_Var value, struct PP_CompletionCallback callback) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_tcp_socket_set_option(tcp_socket, name, value, callback); } const struct PPB_TCPSocket_Private_0_5 ppb_tcp_socket_private_interface_0_5 = { .Create = TWRAPF(ppb_tcp_socket_create), .IsTCPSocket = TWRAPF(ppb_tcp_socket_is_tcp_socket), .Connect = TWRAPF(ppb_tcp_socket_connect), .ConnectWithNetAddress = TWRAPF(ppb_tcp_socket_connect_with_net_address), .GetLocalAddress = TWRAPF(ppb_tcp_socket_get_local_address), .GetRemoteAddress = TWRAPF(ppb_tcp_socket_get_remote_address), .SSLHandshake = TWRAPZ(ppb_tcp_socket_ssl_handshake), .GetServerCertificate = TWRAPZ(ppb_tcp_socket_get_server_certificate), .AddChainBuildingCertificate = TWRAPZ(ppb_tcp_socket_add_chain_building_certificate), .Read = TWRAPF(ppb_tcp_socket_read), .Write = TWRAPF(ppb_tcp_socket_write), .Disconnect = TWRAPF(ppb_tcp_socket_disconnect), .SetOption = TWRAPZ(ppb_tcp_socket_set_option), }; const struct PPB_TCPSocket_Private_0_4 ppb_tcp_socket_private_interface_0_4 = { .Create = TWRAPF(ppb_tcp_socket_create), .IsTCPSocket = TWRAPF(ppb_tcp_socket_is_tcp_socket), .Connect = TWRAPF(ppb_tcp_socket_connect), .ConnectWithNetAddress = TWRAPF(ppb_tcp_socket_connect_with_net_address), .GetLocalAddress = TWRAPF(ppb_tcp_socket_get_local_address), .GetRemoteAddress = TWRAPF(ppb_tcp_socket_get_remote_address),
trace_ppb_file_chooser_dev_show(PP_Resource chooser, struct PP_ArrayOutput output, struct PP_CompletionCallback callback) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_file_chooser_dev_show(chooser, output, callback); } TRACE_WRAPPER int32_t trace_ppb_file_chooser_trusted_show_without_user_gesture(PP_Resource chooser, PP_Bool save_as, struct PP_Var suggested_file_name, struct PP_ArrayOutput output, struct PP_CompletionCallback callback) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_file_chooser_trusted_show_without_user_gesture(chooser, save_as, suggested_file_name, output, callback); } const struct PPB_FileChooser_Dev_0_6 ppb_file_chooser_dev_interface_0_6 = { .Create = TWRAPZ(ppb_file_chooser_dev_create), .IsFileChooser = TWRAPZ(ppb_file_chooser_dev_is_file_chooser), .Show = TWRAPZ(ppb_file_chooser_dev_show), }; const struct PPB_FileChooserTrusted_0_6 ppb_file_chooser_trusted_interface_0_6 = { .ShowWithoutUserGesture = TWRAPZ(ppb_file_chooser_trusted_show_without_user_gesture), };
trace_info("[PPB] {zilch} %s drm=%d, callback={.func=%p, .user_data=%p, .flags=%u}\n", __func__+6, drm, callback.func, callback.user_data, callback.flags); return ppb_flash_drm_get_voucher_file(drm, file_ref, callback); } TRACE_WRAPPER int32_t trace_ppb_flash_drm_monitor_is_external(PP_Resource drm, PP_Bool *is_external, struct PP_CompletionCallback callback) { trace_info("[PPB] {zilch} %s drm=%d, callback={.func=%p, .user_data=%p, .flags=%u}\n", __func__+6, drm, callback.func, callback.user_data, callback.flags); return ppb_flash_drm_monitor_is_external(drm, is_external, callback); } const struct PPB_Flash_DRM_1_1 ppb_flash_drm_interface_1_1 = { .Create = TWRAPF(ppb_flash_drm_create), .GetDeviceID = TWRAPF(ppb_flash_drm_get_device_id), .GetHmonitor = TWRAPZ(ppb_flash_drm_get_hmonitor), .GetVoucherFile = TWRAPZ(ppb_flash_drm_get_voucher_file), .MonitorIsExternal = TWRAPZ(ppb_flash_drm_monitor_is_external), }; const struct PPB_Flash_DRM_1_0 ppb_flash_drm_interface_1_0 = { .Create = TWRAPF(ppb_flash_drm_create), .GetDeviceID = TWRAPF(ppb_flash_drm_get_device_id), .GetHmonitor = TWRAPZ(ppb_flash_drm_get_hmonitor), .GetVoucherFile = TWRAPZ(ppb_flash_drm_get_voucher_file), };
{ trace_info("[CLS] {full} %s npobj=%p\n", __func__+6, npobj); return p2n_enumerate(npobj, value, count); } TRACE_WRAPPER bool trace_p2n_construct(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { trace_info("[CLS] {zilch} %s\n", __func__+6); return p2n_construct(npobj, args, argCount, result); } // can't be const due to npapi restrictions struct NPClass p2n_proxy_class = { .structVersion = NP_CLASS_STRUCT_VERSION, .allocate = TWRAPF(p2n_allocate), .deallocate = TWRAPF(p2n_deallocate), .invalidate = TWRAPF(p2n_invalidate), .hasMethod = TWRAPF(p2n_has_method), .invoke = TWRAPF(p2n_invoke), .invokeDefault = TWRAPZ(p2n_invoke_default), .hasProperty = TWRAPF(p2n_has_property), .getProperty = TWRAPF(p2n_get_property), .setProperty = TWRAPZ(p2n_set_property), .removeProperty = TWRAPZ(p2n_remove_property), .enumerate = TWRAPF(p2n_enumerate), .construct = TWRAPZ(p2n_construct), };
TRACE_WRAPPER uint32_t trace_ppb_font_dev_character_offset_for_pixel(PP_Resource font, const struct PP_TextRun_Dev *text, int32_t pixel_position) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_font_dev_character_offset_for_pixel(font, text, pixel_position); } TRACE_WRAPPER int32_t trace_ppb_font_dev_pixel_offset_for_character(PP_Resource font, const struct PP_TextRun_Dev *text, uint32_t char_offset) { trace_info("[PPB] {zilch} %s\n", __func__+6); return ppb_font_dev_pixel_offset_for_character(font, text, char_offset); } const struct PPB_Font_Dev_0_6 ppb_font_dev_interface_0_6 = { .GetFontFamilies = TWRAPF(ppb_font_dev_get_font_families), .Create = TWRAPZ(ppb_font_dev_create), .IsFont = TWRAPZ(ppb_font_dev_is_font), .Describe = TWRAPZ(ppb_font_dev_describe), .DrawTextAt = TWRAPZ(ppb_font_dev_draw_text_at), .MeasureText = TWRAPZ(ppb_font_dev_measure_text), .CharacterOffsetForPixel = TWRAPZ(ppb_font_dev_character_offset_for_pixel), .PixelOffsetForCharacter = TWRAPZ(ppb_font_dev_pixel_offset_for_character), };
} TRACE_WRAPPER struct PP_Var trace_n2p_construct(void *object, uint32_t argc, struct PP_Var *argv, struct PP_Var *exception) { trace_info("[CLS] {full} %s object=%p, argc=%u, argv=%p\n", __func__+6, object, argc, argv); return n2p_construct(object, argc, argv, exception); } TRACE_WRAPPER void trace_n2p_deallocate(void *object) { trace_info("[CLS] {full} %s object=%p\n", __func__+6, object); n2p_deallocate(object); } const struct PPP_Class_Deprecated n2p_proxy_class = { .HasProperty = TWRAPF(n2p_has_property), .HasMethod = TWRAPZ(n2p_has_method), .GetProperty = TWRAPF(n2p_get_property), .GetAllPropertyNames = TWRAPZ(n2p_get_all_property_names), .SetProperty = TWRAPZ(n2p_set_property), .RemoveProperty = TWRAPZ(n2p_remove_property), .Call = TWRAPF(n2p_call), .Construct = TWRAPF(n2p_construct), .Deallocate = TWRAPF(n2p_deallocate), };
} TRACE_WRAPPER PP_Resource trace_ppb_host_resolver_get_net_address_1_0(PP_Resource host_resolver, uint32_t index) { trace_info("[PPB] {full} %s host_resolver=%d, index=%u\n", __func__+6, host_resolver, index); return ppb_host_resolver_get_net_address_1_0(host_resolver, index); } const struct PPB_HostResolver_Private_0_1 ppb_host_resolver_private_interface_0_1 = { .Create = TWRAPF(ppb_host_resolver_create), .IsHostResolver = TWRAPF(ppb_host_resolver_is_host_resolver), .Resolve = TWRAPF(ppb_host_resolver_resolve), .GetCanonicalName = TWRAPZ(ppb_host_resolver_get_canonical_name), .GetSize = TWRAPF(ppb_host_resolver_get_size), .GetNetAddress = TWRAPF(ppb_host_resolver_get_net_address), }; const struct PPB_HostResolver_1_0 ppb_host_resolver_interface_1_0 = { .Create = TWRAPF(ppb_host_resolver_create), .IsHostResolver = TWRAPF(ppb_host_resolver_is_host_resolver), .Resolve = TWRAPF(ppb_host_resolver_resolve_1_0), .GetCanonicalName = TWRAPZ(ppb_host_resolver_get_canonical_name), .GetNetAddressCount = TWRAPF(ppb_host_resolver_get_net_address_count), .GetNetAddress = TWRAPF(ppb_host_resolver_get_net_address_1_0), }; static void