summaryrefslogtreecommitdiffstats
path: root/chromium/ppapi/c
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-08 14:30:41 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-12 13:49:54 +0200
commitab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch)
tree498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/ppapi/c
parent4ce69f7403811819800e7c5ae1318b2647e778d1 (diff)
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/ppapi/c')
-rw-r--r--chromium/ppapi/c/dev/pp_optional_structs_dev.h34
-rw-r--r--chromium/ppapi/c/dev/ppb_alarms_dev.h210
-rw-r--r--chromium/ppapi/c/dev/ppb_audio_input_dev.h25
-rw-r--r--chromium/ppapi/c/dev/ppb_file_io_dev.h138
-rw-r--r--chromium/ppapi/c/dev/ppb_find_dev.h51
-rw-r--r--chromium/ppapi/c/dev/ppb_graphics_2d_dev.h122
-rw-r--r--chromium/ppapi/c/dev/ppb_keyboard_input_event_dev.h84
-rw-r--r--chromium/ppapi/c/dev/ppb_opengles2ext_dev.h20
-rw-r--r--chromium/ppapi/c/dev/ppb_resource_array_dev.h85
-rw-r--r--chromium/ppapi/c/dev/ppb_var_resource_dev.h60
-rw-r--r--chromium/ppapi/c/dev/ppb_video_capture_dev.h20
-rw-r--r--chromium/ppapi/c/dev/ppp_find_dev.h35
-rw-r--r--chromium/ppapi/c/extensions/dev/ppb_ext_socket_dev.h603
-rw-r--r--chromium/ppapi/c/pp_codecs.h83
-rw-r--r--chromium/ppapi/c/pp_errors.h13
-rw-r--r--chromium/ppapi/c/pp_macros.h20
-rw-r--r--chromium/ppapi/c/pp_rect.h40
-rw-r--r--chromium/ppapi/c/pp_size.h28
-rw-r--r--chromium/ppapi/c/pp_var.h33
-rw-r--r--chromium/ppapi/c/ppb.h4
-rw-r--r--chromium/ppapi/c/ppb_audio.h4
-rw-r--r--chromium/ppapi/c/ppb_audio_buffer.h156
-rw-r--r--chromium/ppapi/c/ppb_audio_config.h4
-rw-r--r--chromium/ppapi/c/ppb_compositor.h148
-rw-r--r--chromium/ppapi/c/ppb_compositor_layer.h236
-rw-r--r--chromium/ppapi/c/ppb_file_mapping.h147
-rw-r--r--chromium/ppapi/c/ppb_file_ref.h78
-rw-r--r--chromium/ppapi/c/ppb_input_event.h53
-rw-r--r--chromium/ppapi/c/ppb_media_stream_audio_track.h215
-rw-r--r--chromium/ppapi/c/ppb_media_stream_video_track.h275
-rw-r--r--chromium/ppapi/c/ppb_message_loop.h4
-rw-r--r--chromium/ppapi/c/ppb_messaging.h67
-rw-r--r--chromium/ppapi/c/ppb_opengles2.h743
-rw-r--r--chromium/ppapi/c/ppb_var.h53
-rw-r--r--chromium/ppapi/c/ppb_video_decoder.h222
-rw-r--r--chromium/ppapi/c/ppb_video_frame.h139
-rw-r--r--chromium/ppapi/c/ppb_view.h34
-rw-r--r--chromium/ppapi/c/ppp_input_event.h10
-rw-r--r--chromium/ppapi/c/ppp_message_handler.h87
-rw-r--r--chromium/ppapi/c/private/pp_content_decryptor.h41
-rw-r--r--chromium/ppapi/c/private/ppb_content_decryptor_private.h88
-rw-r--r--chromium/ppapi/c/private/ppb_display_color_profile_private.h123
-rw-r--r--chromium/ppapi/c/private/ppb_find_private.h81
-rw-r--r--chromium/ppapi/c/private/ppb_flash_clipboard.h34
-rw-r--r--chromium/ppapi/c/private/ppb_flash_drm.h8
-rw-r--r--chromium/ppapi/c/private/ppb_input_event_private.h78
-rw-r--r--chromium/ppapi/c/private/ppb_nacl_private.h381
-rw-r--r--chromium/ppapi/c/private/ppb_pdf.h6
-rw-r--r--chromium/ppapi/c/private/ppb_uma_private.h29
-rw-r--r--chromium/ppapi/c/private/ppp_content_decryptor_private.h75
-rw-r--r--chromium/ppapi/c/private/ppp_find_private.h58
-rw-r--r--chromium/ppapi/c/private/ppp_pdf.h34
52 files changed, 3474 insertions, 1945 deletions
diff --git a/chromium/ppapi/c/dev/pp_optional_structs_dev.h b/chromium/ppapi/c/dev/pp_optional_structs_dev.h
deleted file mode 100644
index 06608febb73..00000000000
--- a/chromium/ppapi/c/dev/pp_optional_structs_dev.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright 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.
- */
-
-/* From dev/pp_optional_structs_dev.idl modified Tue Dec 10 17:39:38 2013. */
-
-#ifndef PPAPI_C_DEV_PP_OPTIONAL_STRUCTS_DEV_H_
-#define PPAPI_C_DEV_PP_OPTIONAL_STRUCTS_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_stdint.h"
-
-/**
- * @file
- * This file defines optional structs for primitive types.
- */
-
-
-/**
- * @addtogroup Structs
- * @{
- */
-struct PP_Optional_Double_Dev {
- double value;
- PP_Bool is_set;
-};
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PP_OPTIONAL_STRUCTS_DEV_H_ */
-
diff --git a/chromium/ppapi/c/dev/ppb_alarms_dev.h b/chromium/ppapi/c/dev/ppb_alarms_dev.h
deleted file mode 100644
index 96617930b3e..00000000000
--- a/chromium/ppapi/c/dev/ppb_alarms_dev.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Copyright 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.
- */
-
-/* From dev/ppb_alarms_dev.idl modified Tue Dec 10 17:40:20 2013. */
-
-#ifndef PPAPI_C_DEV_PPB_ALARMS_DEV_H_
-#define PPAPI_C_DEV_PPB_ALARMS_DEV_H_
-
-#include "ppapi/c/dev/pp_optional_structs_dev.h"
-#include "ppapi/c/pp_array_output.h"
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/pp_var.h"
-
-#define PPB_ALARMS_DEV_INTERFACE_0_1 "PPB_Alarms(Dev);0.1"
-#define PPB_ALARMS_DEV_INTERFACE PPB_ALARMS_DEV_INTERFACE_0_1
-
-/**
- * @file
- * This file defines the Pepper equivalent of the <code>chrome.alarms</code>
- * extension API.
- */
-
-
-/**
- * @addtogroup Structs
- * @{
- */
-struct PP_Alarms_Alarm_Dev {
- /**
- * Name of this alarm.
- */
- struct PP_Var name;
- /**
- * Time at which this alarm was scheduled to fire, in milliseconds past the
- * epoch. For performance reasons, the alarm may have been delayed an
- * arbitrary amount beyond this.
- */
- double scheduled_time;
- /**
- * If set, the alarm is a repeating alarm and will fire again in
- * <code>period_in_minutes</code> minutes.
- */
- struct PP_Optional_Double_Dev period_in_minutes;
-};
-
-struct PP_Alarms_AlarmCreateInfo_Dev {
- /**
- * Time at which the alarm should fire, in milliseconds past the epoch.
- */
- struct PP_Optional_Double_Dev when;
- /**
- * Length of time in minutes after which the
- * <code>PP_Alarms_OnAlarm_Dev</code> event should fire.
- */
- struct PP_Optional_Double_Dev delay_in_minutes;
- /**
- * If set, the <code>PP_Alarms_OnAlarm_Dev</code> event should fire every
- * <code>period_in_minutes</code> minutes after the initial event specified by
- * <code>when</code> or <code>delay_in_minutes</code>. If not set, the alarm
- * will only fire once.
- */
- struct PP_Optional_Double_Dev period_in_minutes;
-};
-
-struct PP_Alarms_Alarm_Array_Dev {
- uint32_t size;
- struct PP_Alarms_Alarm_Dev *elements;
-};
-/**
- * @}
- */
-
-/**
- * @addtogroup Typedefs
- * @{
- */
-/**
- * Fired when an alarm has elapsed. Useful for event pages.
- *
- * @param[in] listener_id The listener ID.
- * @param[inout] user_data The opaque pointer that was used when registering the
- * listener.
- * @param[in] alarm The alarm that has elapsed.
- */
-typedef void (*PP_Alarms_OnAlarm_Dev)(
- uint32_t listener_id,
- void* user_data,
- const struct PP_Alarms_Alarm_Dev* alarm);
-/**
- * @}
- */
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-struct PPB_Alarms_Dev_0_1 {
- /**
- * Creates an alarm. Near the time(s) specified by <code>alarm_info</code>,
- * the <code>PP_Alarms_OnAlarm_Dev</code> event is fired. If there is another
- * alarm with the same name (or no name if none is specified), it will be
- * cancelled and replaced by this alarm.
- *
- * In order to reduce the load on the user's machine, Chrome limits alarms
- * to at most once every 1 minute but may delay them an arbitrary amount more.
- * That is, setting
- * <code>PP_Alarms_AlarmCreateInfo_Dev.delay_in_minutes</code> or
- * <code>PP_Alarms_AlarmCreateInfo_Dev.period_in_minutes</code> to less than
- * <code>1</code> will not be honored and will cause a warning.
- * <code>PP_Alarms_AlarmCreateInfo_Dev.when</code> can be set to less than 1
- * minute after "now" without warning but won't actually cause the alarm to
- * fire for at least 1 minute.
- *
- * To help you debug your app or extension, when you've loaded it unpacked,
- * there's no limit to how often the alarm can fire.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] name A string or undefined <code>PP_Var</code>. Optional name to
- * identify this alarm. Defaults to the empty string.
- * @param[in] alarm_info Describes when the alarm should fire. The initial
- * time must be specified by either <code>when</code> or
- * <code>delay_in_minutes</code> (but not both). If
- * <code>period_in_minutes</code> is set, the alarm will repeat every
- * <code>period_in_minutes</code> minutes after the initial event. If neither
- * <code>when</code> or <code>delay_in_minutes</code> is set for a repeating
- * alarm, <code>period_in_minutes</code> is used as the default for
- * <code>delay_in_minutes</code>.
- */
- void (*Create)(PP_Instance instance,
- struct PP_Var name,
- const struct PP_Alarms_AlarmCreateInfo_Dev* alarm_info);
- /**
- * Retrieves details about the specified alarm.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] name A string or undefined <code>PP_Var</code>. The name of the
- * alarm to get. Defaults to the empty string.
- * @param[out] alarm A <code>PP_Alarms_Alarm_Dev</code> struct to store the
- * output result.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion.
- *
- * @return An error code from <code>pp_errors.h</code>
- */
- int32_t (*Get)(PP_Instance instance,
- struct PP_Var name,
- struct PP_Alarms_Alarm_Dev* alarm,
- struct PP_CompletionCallback callback);
- /**
- * Gets an array of all the alarms.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[out] alarms A <code>PP_Alarms_Alarm_Array_Dev</code> to store the
- * output result.
- * @param[in] array_allocator A <code>PP_ArrayOutput</code> to allocate memory
- * for <code>alarms</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion.
- *
- * @return An error code from <code>pp_errors.h</code>
- */
- int32_t (*GetAll)(PP_Instance instance,
- struct PP_Alarms_Alarm_Array_Dev* alarms,
- struct PP_ArrayOutput array_allocator,
- struct PP_CompletionCallback callback);
- /**
- * Clears the alarm with the given name.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] name A string or undefined <code>PP_Var</code>. The name of the
- * alarm to clear. Defaults to the empty string.
- */
- void (*Clear)(PP_Instance instance, struct PP_Var name);
- /**
- * Clears all alarms.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- */
- void (*ClearAll)(PP_Instance instance);
- /**
- * Registers <code>PP_Alarms_OnAlarm_Dev</code> event.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] callback The callback to receive notifications.
- * @param[inout] user_data An opaque pointer that will be passed to
- * <code>callback</code>.
- *
- * @return A listener ID, or 0 if failed.
- *
- * TODO(yzshen): add a PPB_Events_Dev interface for unregistering:
- * void UnregisterListener(PP_instance instance, uint32_t listener_id);
- */
- uint32_t (*AddOnAlarmListener)(PP_Instance instance,
- PP_Alarms_OnAlarm_Dev callback,
- void* user_data);
-};
-
-typedef struct PPB_Alarms_Dev_0_1 PPB_Alarms_Dev;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_ALARMS_DEV_H_ */
-
diff --git a/chromium/ppapi/c/dev/ppb_audio_input_dev.h b/chromium/ppapi/c/dev/ppb_audio_input_dev.h
index 2fd4d0709f7..bd065f01845 100644
--- a/chromium/ppapi/c/dev/ppb_audio_input_dev.h
+++ b/chromium/ppapi/c/dev/ppb_audio_input_dev.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From dev/ppb_audio_input_dev.idl modified Fri May 10 16:06:35 2013. */
+/* From dev/ppb_audio_input_dev.idl modified Thu Dec 12 15:35:39 2013. */
#ifndef PPAPI_C_DEV_PPB_AUDIO_INPUT_DEV_H_
#define PPAPI_C_DEV_PPB_AUDIO_INPUT_DEV_H_
@@ -18,7 +18,6 @@
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_time.h"
-#define PPB_AUDIO_INPUT_DEV_INTERFACE_0_2 "PPB_AudioInput(Dev);0.2"
#define PPB_AUDIO_INPUT_DEV_INTERFACE_0_3 "PPB_AudioInput(Dev);0.3"
#define PPB_AUDIO_INPUT_DEV_INTERFACE_0_4 "PPB_AudioInput(Dev);0.4"
#define PPB_AUDIO_INPUT_DEV_INTERFACE PPB_AUDIO_INPUT_DEV_INTERFACE_0_4
@@ -50,7 +49,7 @@ typedef void (*PPB_AudioInput_Callback)(const void* sample_buffer,
PP_TimeDelta latency,
void* user_data);
-typedef void (*PPB_AudioInput_Callback_0_2)(const void* sample_buffer,
+typedef void (*PPB_AudioInput_Callback_0_3)(const void* sample_buffer,
uint32_t buffer_size_in_bytes,
void* user_data);
/**
@@ -211,24 +210,6 @@ struct PPB_AudioInput_Dev_0_4 {
typedef struct PPB_AudioInput_Dev_0_4 PPB_AudioInput_Dev;
-struct PPB_AudioInput_Dev_0_2 {
- PP_Resource (*Create)(PP_Instance instance);
- PP_Bool (*IsAudioInput)(PP_Resource resource);
- int32_t (*EnumerateDevices)(PP_Resource audio_input,
- PP_Resource* devices,
- struct PP_CompletionCallback callback);
- int32_t (*Open)(PP_Resource audio_input,
- PP_Resource device_ref,
- PP_Resource config,
- PPB_AudioInput_Callback_0_2 audio_input_callback,
- void* user_data,
- struct PP_CompletionCallback callback);
- PP_Resource (*GetCurrentConfig)(PP_Resource audio_input);
- PP_Bool (*StartCapture)(PP_Resource audio_input);
- PP_Bool (*StopCapture)(PP_Resource audio_input);
- void (*Close)(PP_Resource audio_input);
-};
-
struct PPB_AudioInput_Dev_0_3 {
PP_Resource (*Create)(PP_Instance instance);
PP_Bool (*IsAudioInput)(PP_Resource resource);
@@ -241,7 +222,7 @@ struct PPB_AudioInput_Dev_0_3 {
int32_t (*Open)(PP_Resource audio_input,
PP_Resource device_ref,
PP_Resource config,
- PPB_AudioInput_Callback_0_2 audio_input_callback,
+ PPB_AudioInput_Callback_0_3 audio_input_callback,
void* user_data,
struct PP_CompletionCallback callback);
PP_Resource (*GetCurrentConfig)(PP_Resource audio_input);
diff --git a/chromium/ppapi/c/dev/ppb_file_io_dev.h b/chromium/ppapi/c/dev/ppb_file_io_dev.h
deleted file mode 100644
index a60d3a64c10..00000000000
--- a/chromium/ppapi/c/dev/ppb_file_io_dev.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* 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.
- */
-
-/* From dev/ppb_file_io_dev.idl modified Thu Sep 19 10:07:03 2013. */
-
-#ifndef PPAPI_C_DEV_PPB_FILE_IO_DEV_H_
-#define PPAPI_C_DEV_PPB_FILE_IO_DEV_H_
-
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_resource.h"
-#include "ppapi/c/pp_stdint.h"
-
-#define PPB_FILEIO_DEV_INTERFACE_0_1 "PPB_FileIO(Dev);0.1"
-#define PPB_FILEIO_DEV_INTERFACE PPB_FILEIO_DEV_INTERFACE_0_1
-
-/**
- * @file
- * This file defines methods for use with a PPB_FileIO resource that may become
- * stable in the future. For now, they can be used only in plugins with DEV
- * permissions.
- */
-
-
-/**
- * @addtogroup Enums
- * @{
- */
-/**
- * The PP_FileMapProtection values indicate the permissions requested for the
- * file mapping. These should be used in a uint32_t bitfield.
- */
-typedef enum {
- /** Requests read access to the mapped address. */
- PP_FILEMAPPROTECTION_READ = 1u << 0,
- /** Requests write access to the mapped address. */
- PP_FILEMAPPROTECTION_WRITE = 1u << 1
-} PP_FileMapProtection;
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapProtection, 4);
-
-/**
- * The PP_FileMapFlags contain flag values for use with Map().
- */
-typedef enum {
- /**
- * Requests a shared mapping. If this flag is set, changes written to the
- * memory region will be reflected in the underlying file and will thus
- * eventually be visible to other processes which have opened the file. The
- * file may not actually be updated until Unmap() is called. This is only
- * valid if the PPB_FileIO resource was opened with write permission.
- */
- PP_FILEMAPFLAG_SHARED = 1u << 0,
- /**
- * Requests a copy-on-write mapping. If this flag is set, changes are not
- * written to the underlying file, but only in the memory of the process
- * (copy-on-write).
- */
- PP_FILEMAPFLAG_PRIVATE = 1u << 1,
- /**
- * Forces Map() to map the file contents at the provided |address|. If Map()
- * can not comply, Map() will fail.
- */
- PP_FILEMAPFLAG_FIXED = 1u << 2
-} PP_FileMapFlags;
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapFlags, 4);
-/**
- * @}
- */
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/**
- * PPB_FileIO_Dev contains functions that are usable with PPB_FileIO resources
- * but aren't yet considered stable yet and thus are not supported for general
- * NaCl or PNaCl apps yet. Features here are being tested and refined for
- * possible future inclusion in (stable) PPB_FileIO.
- */
-struct PPB_FileIO_Dev_0_1 {
- /**
- * Map() maps the contents from an offset of the file into memory.
- *
- * @param[in] file_io A PP_Resource corresponding to a file.
- * @param[in] length The number of bytes to map.
- * @param[in] map_protection A bitfield containing values from
- * PP_FileMapProtection, indicating what memory operations should be permitted
- * on the mapped region.
- * @param[in] map_flags A bitfield containing values from
- * PP_FileMapFlags, providing options for the behavior of Map. If the region
- * is to be writeable, then exactly one of PP_FILEMAPFLAG_SHARED or
- * PP_FILEMAPFLAG_PRIVATE must be set.
- * @param[in] offset The offset into the file. Must be a multiple of the
- * Map page size as returned by GetMapPageSize.
- * @param[inout] address The value of |*address|, if non-NULL, will be used as
- * a hint to determine where in memory the file should be mapped. If the value
- * is NULL, the host operating system will choose |address|. Upon
- * Map() completing, |*address| will contain the actual memory location at
- * which the file was mapped. If the plugin provides a non-NULL |*address|, it
- * must be a multiple of the map page size as returned by GetMapPageSize().
- * @param[in] callback A PP_CompletionCallback to be called upon
- * completion of Map().
- *
- * @return An int32_t containing an error code from <code>pp_errors.h</code>.
- */
- int32_t (*Map)(PP_Resource file_io,
- int64_t length,
- uint32_t map_protection,
- uint32_t map_flags,
- int64_t offset,
- void** address,
- struct PP_CompletionCallback callback);
- /**
- * Unmap() deletes the mapping of the specified address address to a
- * file io. The specified address must have been retrieved with
- * Map().
- * @param[in] file_io A PP_Resource corresponding to a file.
- * @param[in] address The starting address of the address in memory to
- * be unmapped.
- * @param[in] length The length of the region to unmap.
- */
- void (*Unmap)(PP_Resource file_io, void* address, int64_t length);
- /**
- * GetMapPageSize() returns the size of pages that Map() uses. Returns 0 on
- * failure.
- */
- int64_t (*GetMapPageSize)(PP_Resource file_io);
-};
-
-typedef struct PPB_FileIO_Dev_0_1 PPB_FileIO_Dev;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_FILE_IO_DEV_H_ */
-
diff --git a/chromium/ppapi/c/dev/ppb_find_dev.h b/chromium/ppapi/c/dev/ppb_find_dev.h
deleted file mode 100644
index 203425d291a..00000000000
--- a/chromium/ppapi/c/dev/ppb_find_dev.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (c) 2012 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.
- */
-
-/* From dev/ppb_find_dev.idl modified Wed Oct 5 14:06:02 2011. */
-
-#ifndef PPAPI_C_DEV_PPB_FIND_DEV_H_
-#define PPAPI_C_DEV_PPB_FIND_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_stdint.h"
-
-#define PPB_FIND_DEV_INTERFACE_0_3 "PPB_Find(Dev);0.3"
-#define PPB_FIND_DEV_INTERFACE PPB_FIND_DEV_INTERFACE_0_3
-
-/**
- * @file
- * This file defines the <code>PPB_Find_Dev</code> interface.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-struct PPB_Find_Dev_0_3 {
- /**
- * Updates the number of find results for the current search term. If
- * there are no matches 0 should be passed in. Only when the plugin has
- * finished searching should it pass in the final count with final_result set
- * to PP_TRUE.
- */
- void (*NumberOfFindResultsChanged)(PP_Instance instance,
- int32_t total,
- PP_Bool final_result);
- /**
- * Updates the index of the currently selected search item.
- */
- void (*SelectedFindResultChanged)(PP_Instance instance, int32_t index);
-};
-
-typedef struct PPB_Find_Dev_0_3 PPB_Find_Dev;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_FIND_DEV_H_ */
-
diff --git a/chromium/ppapi/c/dev/ppb_graphics_2d_dev.h b/chromium/ppapi/c/dev/ppb_graphics_2d_dev.h
deleted file mode 100644
index 245ae588ff7..00000000000
--- a/chromium/ppapi/c/dev/ppb_graphics_2d_dev.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Copyright (c) 2012 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.
- */
-
-/* From dev/ppb_graphics_2d_dev.idl modified Tue Nov 12 11:22:26 2013. */
-
-#ifndef PPAPI_C_DEV_PPB_GRAPHICS_2D_DEV_H_
-#define PPAPI_C_DEV_PPB_GRAPHICS_2D_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_point.h"
-#include "ppapi/c/pp_resource.h"
-#include "ppapi/c/pp_stdint.h"
-
-#define PPB_GRAPHICS2D_DEV_INTERFACE_0_1 "PPB_Graphics2D(Dev);0.1"
-#define PPB_GRAPHICS2D_DEV_INTERFACE_0_2 "PPB_Graphics2D(Dev);0.2"
-#define PPB_GRAPHICS2D_DEV_INTERFACE PPB_GRAPHICS2D_DEV_INTERFACE_0_2
-
-/**
- * @file
- * This file contains the <code>PPB_Graphics2D_Dev</code> interface. */
-
-
-/**
- * @addtogroup Enums
- * @{
- */
-/**
- * These options affect how the existing graphics context is displayed when a
- * plugin is resized.
- */
-typedef enum {
- /**
- * In this mode, the context does not change size or offset. If the backing
- * store is the same size as the plugin element, this will result in the
- * pixels on the right side of the plugin element being unavailable, revealing
- * the contents underneath it.
- */
- PP_GRAPHICS2D_DEV_RESIZEMODE_DEFAULT,
- /**
- * In this mode, the context and its offset are scaled relative to how much
- * the plugin element has been resized.
- */
- PP_GRAPHICS2D_DEV_RESIZEMODE_STRETCH
-} PP_Graphics2D_Dev_ResizeMode;
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Graphics2D_Dev_ResizeMode, 4);
-/**
- * @}
- */
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/* PPB_Graphics2D_Dev interface */
-struct PPB_Graphics2D_Dev_0_2 {
- /**
- * SetScale() sets the scale factor that will be applied when painting the
- * graphics context onto the output device. Typically, if rendering at device
- * resolution is desired, the context would be created with the width and
- * height scaled up by the view's GetDeviceScale and SetScale called with a
- * scale of 1.0 / GetDeviceScale(). For example, if the view resource passed
- * to DidChangeView has a rectangle of (w=200, h=100) and a device scale of
- * 2.0, one would call Create with a size of (w=400, h=200) and then call
- * SetScale with 0.5. One would then treat each pixel in the context as a
- * single device pixel.
- *
- * @param[in] resource A <code>Graphics2D</code> context resource.
- * @param[in] scale The scale to apply when painting.
- *
- * @return Returns <code>PP_TRUE</code> on success or <code>PP_FALSE</code> if
- * the resource is invalid or the scale factor is 0 or less.
- */
- PP_Bool (*SetScale)(PP_Resource resource, float scale);
- /***
- * GetScale() gets the scale factor that will be applied when painting the
- * graphics context onto the output device.
- *
- * @param[in] resource A <code>Graphics2D</code> context resource.
- *
- * @return Returns the scale factor for the graphics context. If the resource
- * is not a valid <code>Graphics2D</code> context, this will return 0.0.
- */
- float (*GetScale)(PP_Resource resource);
- /***
- * Sets the offset into the plugin element at which the graphics context is
- * painted. This allows a portion of the plugin element to be painted to.
- * The new offset will only be applied after Flush() has been called.
- *
- * @param[in] resource A <code>Graphics2D</code> context resource.
- * @param[in] offset The offset at which the context should be painted.
- */
- void (*SetOffset)(PP_Resource resource, const struct PP_Point* offset);
- /***
- * Sets the resize mode for the graphics context. When a plugin element is
- * resized in the DOM, it takes time for the plugin to update the graphics
- * context in the renderer. These options affect how the existing context is
- * displayed until the backing store is updated by the plugin.
- *
- * @param[in] resource A <code>Graphics2D</code> context resource.
- * @param[in] resize_mode The resize mode to change this context to.
- */
- void (*SetResizeMode)(PP_Resource resource,
- PP_Graphics2D_Dev_ResizeMode resize_mode);
-};
-
-typedef struct PPB_Graphics2D_Dev_0_2 PPB_Graphics2D_Dev;
-
-struct PPB_Graphics2D_Dev_0_1 {
- PP_Bool (*SetScale)(PP_Resource resource, float scale);
- float (*GetScale)(PP_Resource resource);
- void (*SetResizeMode)(PP_Resource resource,
- PP_Graphics2D_Dev_ResizeMode resize_mode);
-};
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_GRAPHICS_2D_DEV_H_ */
-
diff --git a/chromium/ppapi/c/dev/ppb_keyboard_input_event_dev.h b/chromium/ppapi/c/dev/ppb_keyboard_input_event_dev.h
deleted file mode 100644
index a921bd9f36f..00000000000
--- a/chromium/ppapi/c/dev/ppb_keyboard_input_event_dev.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Copyright (c) 2012 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.
- */
-
-/* From dev/ppb_keyboard_input_event_dev.idl,
- * modified Fri Sep 6 10:00:04 2013.
- */
-
-#ifndef PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_
-#define PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_resource.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/pp_var.h"
-
-#define PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE_0_2 \
- "PPB_KeyboardInputEvent(Dev);0.2"
-#define PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE \
- PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE_0_2
-
-/**
- * @file
- * This file defines the <code>PPB_KeyboardInputEvent_Dev</code> interface,
- * which provides access to USB key codes that identify the physical key being
- * pressed.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/**
- * The <code>PPB_KeyboardInputEvent_Dev</code> interface is an extension to the
- * PPB_KeyboardInputEvent</code> interface that provides
- */
-struct PPB_KeyboardInputEvent_Dev_0_2 {
- /**
- * This sets a USB key code in the given <code>PP_Resource</code>. It is
- * intended that this method be called immediately after any call to
- * <code>Create</code>.
- *
- * @param[in] key_event A <code>PP_Resource</code> created by
- * <code>PPB_KeyboardInputEvent</code>'s <code>Create</code> method.
- *
- * @param[in] usb_key_code The USB key code to associate with this
- * <code>key_event</code>.
- *
- * @return <code>PP_TRUE</code> if the USB key code was set successfully.
- */
- PP_Bool (*SetUsbKeyCode)(PP_Resource key_event, uint32_t usb_key_code);
- /**
- * GetUsbKeyCode() returns the USB key code associated with this keyboard
- * event.
- *
- * @param[in] key_event The key event for which to return the key code.
- *
- * @return The USB key code field for the keyboard event. If there is no
- * USB scancode associated with this event, or if the PP_Resource does not
- * support the PPB_InputEvent_API (i.e., it is not an input event), then
- * a 0 is returned.
- */
- uint32_t (*GetUsbKeyCode)(PP_Resource key_event);
- /**
- * GetCode() returns the DOM |code| field for this keyboard event, as
- * defined by the UI Events spec: http://www.w3.org/TR/uievents/
- *
- * @param[in] key_event The key event for which to return the key code.
- *
- * @return The string that contains the DOM |code| for the keyboard event.
- */
- struct PP_Var (*GetCode)(PP_Resource key_event);
-};
-
-typedef struct PPB_KeyboardInputEvent_Dev_0_2 PPB_KeyboardInputEvent_Dev;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_ */
-
diff --git a/chromium/ppapi/c/dev/ppb_opengles2ext_dev.h b/chromium/ppapi/c/dev/ppb_opengles2ext_dev.h
index 9696c636696..81dc7f48236 100644
--- a/chromium/ppapi/c/dev/ppb_opengles2ext_dev.h
+++ b/chromium/ppapi/c/dev/ppb_opengles2ext_dev.h
@@ -1,17 +1,29 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 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.
// This file is auto-generated from
// gpu/command_buffer/build_gles2_cmd_buffer.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
// DO NOT EDIT!
// OpenGL ES interface.
-#ifndef C_DEV_PPB_OPENGLES2EXT_DEV_H_
-#define C_DEV_PPB_OPENGLES2EXT_DEV_H_
+#ifndef PPAPI_C_DEV_PPB_OPENGLES2EXT_DEV_H_
+#define PPAPI_C_DEV_PPB_OPENGLES2EXT_DEV_H_
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/ppb_opengles2.h"
-#endif // C_DEV_PPB_OPENGLES2EXT_DEV_H_
+#define PPB_OPENGLES2_DRAWBUFFERS_DEV_INTERFACE_1_0 \
+ "PPB_OpenGLES2DrawBuffers(Dev);1.0"
+#define PPB_OPENGLES2_DRAWBUFFERS_DEV_INTERFACE \
+ PPB_OPENGLES2_DRAWBUFFERS_DEV_INTERFACE_1_0
+struct PPB_OpenGLES2DrawBuffers_Dev {
+ void (*DrawBuffersEXT)(PP_Resource context,
+ GLsizei count,
+ const GLenum* bufs);
+};
+
+#endif // PPAPI_C_DEV_PPB_OPENGLES2EXT_DEV_H_
diff --git a/chromium/ppapi/c/dev/ppb_resource_array_dev.h b/chromium/ppapi/c/dev/ppb_resource_array_dev.h
deleted file mode 100644
index 03a811e8307..00000000000
--- a/chromium/ppapi/c/dev/ppb_resource_array_dev.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (c) 2012 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.
- */
-
-/* From dev/ppb_resource_array_dev.idl modified Fri Jan 6 11:59:21 2012. */
-
-#ifndef PPAPI_C_DEV_PPB_RESOURCE_ARRAY_DEV_H_
-#define PPAPI_C_DEV_PPB_RESOURCE_ARRAY_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_resource.h"
-#include "ppapi/c/pp_stdint.h"
-
-#define PPB_RESOURCEARRAY_DEV_INTERFACE_0_1 "PPB_ResourceArray(Dev);0.1"
-#define PPB_RESOURCEARRAY_DEV_INTERFACE PPB_RESOURCEARRAY_DEV_INTERFACE_0_1
-
-/**
- * @file
- * This file defines the <code>PPB_ResourceArray_Dev</code> interface.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/**
- * A resource array holds a list of resources and retains a reference to each of
- * them.
- */
-struct PPB_ResourceArray_Dev_0_1 {
- /**
- * Creates a resource array.
- * Note: It will add a reference to each of the elements.
- *
- * @param[in] elements <code>PP_Resource</code>s to be stored in the created
- * resource array.
- * @param[in] size The number of elements.
- *
- * @return A <code>PP_Resource</code> corresponding to a resource array if
- * successful; 0 if failed.
- */
- PP_Resource (*Create)(PP_Instance instance,
- const PP_Resource elements[],
- uint32_t size);
- /**
- * Determines if the provided resource is a resource array.
- *
- * @param[in] resource A <code>PP_Resource</code> corresponding to a generic
- * resource.
- *
- * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given
- * resource is a resource array, otherwise <code>PP_FALSE</code>.
- */
- PP_Bool (*IsResourceArray)(PP_Resource resource);
- /**
- * Gets the array size.
- *
- * @param[in] resource_array The resource array.
- *
- * @return How many elements are there in the array.
- */
- uint32_t (*GetSize)(PP_Resource resource_array);
- /**
- * Gets the element at the specified position.
- * Note: It doesn't add a reference to the returned resource for the caller.
- *
- * @param[in] resource_array The resource array.
- * @param[in] index An integer indicating a position in the array.
- *
- * @return A <code>PP_Resource</code>. Returns 0 if the index is out of range.
- */
- PP_Resource (*GetAt)(PP_Resource resource_array, uint32_t index);
-};
-
-typedef struct PPB_ResourceArray_Dev_0_1 PPB_ResourceArray_Dev;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_RESOURCE_ARRAY_DEV_H_ */
-
diff --git a/chromium/ppapi/c/dev/ppb_var_resource_dev.h b/chromium/ppapi/c/dev/ppb_var_resource_dev.h
deleted file mode 100644
index 463f10a17c7..00000000000
--- a/chromium/ppapi/c/dev/ppb_var_resource_dev.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright 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.
- */
-
-/* From dev/ppb_var_resource_dev.idl modified Fri Oct 11 10:31:47 2013. */
-
-#ifndef PPAPI_C_DEV_PPB_VAR_RESOURCE_DEV_H_
-#define PPAPI_C_DEV_PPB_VAR_RESOURCE_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_resource.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/pp_var.h"
-
-#define PPB_VAR_RESOURCE_DEV_INTERFACE_0_1 "PPB_VarResource(Dev);0.1"
-#define PPB_VAR_RESOURCE_DEV_INTERFACE PPB_VAR_RESOURCE_DEV_INTERFACE_0_1
-
-/**
- * @file
- * This file defines the <code>PPB_VarResource</code> struct providing
- * a way to interact with resource vars.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-struct PPB_VarResource_Dev_0_1 {
- /**
- * Converts a resource-type var to a <code>PP_Resource</code>.
- *
- * @param[in] var A <code>PP_Var</code> struct containing a resource-type var.
- *
- * @return A <code>PP_Resource</code> retrieved from the var, or 0 if the var
- * is not a resource. The reference count of the resource is incremented on
- * behalf of the caller.
- */
- PP_Resource (*VarToResource)(struct PP_Var var);
- /**
- * Creates a new <code>PP_Var</code> from a given resource.
- *
- * @param[in] resource A <code>PP_Resource</code> to be wrapped in a var.
- *
- * @return A <code>PP_Var</code> created for this resource, with type
- * <code>PP_VARTYPE_RESOURCE</code>. The reference count of the var is set to
- * 1 on behalf of the caller.
- */
- struct PP_Var (*VarFromResource)(PP_Resource resource);
-};
-
-typedef struct PPB_VarResource_Dev_0_1 PPB_VarResource_Dev;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_VAR_RESOURCE_DEV_H_ */
-
diff --git a/chromium/ppapi/c/dev/ppb_video_capture_dev.h b/chromium/ppapi/c/dev/ppb_video_capture_dev.h
index a4704b21fd9..30f543ee709 100644
--- a/chromium/ppapi/c/dev/ppb_video_capture_dev.h
+++ b/chromium/ppapi/c/dev/ppb_video_capture_dev.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From dev/ppb_video_capture_dev.idl modified Wed Dec 05 13:18:10 2012. */
+/* From dev/ppb_video_capture_dev.idl modified Thu Dec 12 15:36:11 2013. */
#ifndef PPAPI_C_DEV_PPB_VIDEO_CAPTURE_DEV_H_
#define PPAPI_C_DEV_PPB_VIDEO_CAPTURE_DEV_H_
@@ -18,7 +18,6 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
-#define PPB_VIDEOCAPTURE_DEV_INTERFACE_0_2 "PPB_VideoCapture(Dev);0.2"
#define PPB_VIDEOCAPTURE_DEV_INTERFACE_0_3 "PPB_VideoCapture(Dev);0.3"
#define PPB_VIDEOCAPTURE_DEV_INTERFACE PPB_VIDEOCAPTURE_DEV_INTERFACE_0_3
@@ -160,23 +159,6 @@ struct PPB_VideoCapture_Dev_0_3 {
};
typedef struct PPB_VideoCapture_Dev_0_3 PPB_VideoCapture_Dev;
-
-struct PPB_VideoCapture_Dev_0_2 {
- PP_Resource (*Create)(PP_Instance instance);
- PP_Bool (*IsVideoCapture)(PP_Resource video_capture);
- int32_t (*EnumerateDevices)(PP_Resource video_capture,
- PP_Resource* devices,
- struct PP_CompletionCallback callback);
- int32_t (*Open)(PP_Resource video_capture,
- PP_Resource device_ref,
- const struct PP_VideoCaptureDeviceInfo_Dev* requested_info,
- uint32_t buffer_count,
- struct PP_CompletionCallback callback);
- int32_t (*StartCapture)(PP_Resource video_capture);
- int32_t (*ReuseBuffer)(PP_Resource video_capture, uint32_t buffer);
- int32_t (*StopCapture)(PP_Resource video_capture);
- void (*Close)(PP_Resource video_capture);
-};
/**
* @}
*/
diff --git a/chromium/ppapi/c/dev/ppp_find_dev.h b/chromium/ppapi/c/dev/ppp_find_dev.h
deleted file mode 100644
index ecf0729f440..00000000000
--- a/chromium/ppapi/c/dev/ppp_find_dev.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (c) 2010 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.
- */
-#ifndef PPAPI_C_DEV_PPP_FIND_DEV_H_
-#define PPAPI_C_DEV_PPP_FIND_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_instance.h"
-
-#define PPP_FIND_DEV_INTERFACE "PPP_Find(Dev);0.3"
-
-struct PPP_Find_Dev {
- // Finds the given UTF-8 text starting at the current selection. The number of
- // results will be updated asynchronously via NumberOfFindResultsChanged in
- // PPB_Find. Note that multiple StartFind calls can happen before StopFind is
- // called in the case of the search term changing.
- //
- // Return PP_FALSE if the plugin doesn't support find in page. Consequently,
- // it won't call any callbacks.
- PP_Bool (*StartFind)(PP_Instance instance,
- const char* text,
- PP_Bool case_sensitive);
-
- // Go to the next/previous result.
- void (*SelectFindResult)(PP_Instance instance,
- PP_Bool forward);
-
- // Tells the plugin that the find operation has stopped, so it should clear
- // any highlighting.
- void (*StopFind)(PP_Instance instance);
-};
-
-#endif /* PPAPI_C_DEV_PPP_FIND_DEV_H_ */
-
diff --git a/chromium/ppapi/c/extensions/dev/ppb_ext_socket_dev.h b/chromium/ppapi/c/extensions/dev/ppb_ext_socket_dev.h
deleted file mode 100644
index 61bddd1b18f..00000000000
--- a/chromium/ppapi/c/extensions/dev/ppb_ext_socket_dev.h
+++ /dev/null
@@ -1,603 +0,0 @@
-/* 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.
- */
-
-/* From extensions/dev/ppb_ext_socket_dev.idl,
- * modified Tue May 21 16:00:11 2013.
- */
-
-#ifndef PPAPI_C_EXTENSIONS_DEV_PPB_EXT_SOCKET_DEV_H_
-#define PPAPI_C_EXTENSIONS_DEV_PPB_EXT_SOCKET_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/pp_var.h"
-
-#define PPB_EXT_SOCKET_DEV_INTERFACE_0_1 "PPB_Ext_Socket(Dev);0.1"
-#define PPB_EXT_SOCKET_DEV_INTERFACE_0_2 "PPB_Ext_Socket(Dev);0.2"
-#define PPB_EXT_SOCKET_DEV_INTERFACE PPB_EXT_SOCKET_DEV_INTERFACE_0_2
-
-/**
- * @file
- * This file defines the Pepper equivalent of the <code>chrome.socket</code>
- * extension API.
- */
-
-
-/**
- * @addtogroup Typedefs
- * @{
- */
-/**
- * A string <code>PP_Var</code> which has one of the following values:
- * - "tcp"
- * - "udp"
- */
-typedef struct PP_Var PP_Ext_Socket_SocketType_Dev;
-
-/**
- * A dictionary <code>PP_Var</code>.
- */
-typedef struct PP_Var PP_Ext_Socket_CreateOptions_Dev;
-
-/**
- * A dictionary <code>PP_Var</code> which contains
- * - "socketId" : integer <code>PP_Var</code>
- * The id of the newly created socket.
- */
-typedef struct PP_Var PP_Ext_Socket_CreateInfo_Dev;
-
-/**
- * A dictionary <code>PP_Var</code> which contains
- * - "resultCode" : integer <code>PP_Var</code>
- * - "socketId" : integer or undefined <code>PP_Var</code>
- * The id of the accepted socket.
- */
-typedef struct PP_Var PP_Ext_Socket_AcceptInfo_Dev;
-
-/**
- * A dictionary <code>PP_Var</code> which contains
- * - "resultCode" : integer <code>PP_Var</code>
- * The resultCode returned from the underlying read() call.
- * - "data" : array buffer <code>PP_Var</code>
- */
-typedef struct PP_Var PP_Ext_Socket_ReadInfo_Dev;
-
-/**
- * A dictionary <code>PP_Var</code> which contains
- * - "bytesWritten" : integer <code>PP_Var</code>
- * The number of bytes sent, or a negative error code.
- */
-typedef struct PP_Var PP_Ext_Socket_WriteInfo_Dev;
-
-/**
- * A dictionary <code>PP_Var</code> which contains
- * - "resultCode" : integer <code>PP_Var</code>
- * The resultCode returned from the underlying recvfrom() call.
- * - "data": array buffer <code>PP_Var</code>
- * - "address": string <code>PP_Var</code>
- * The address of the remote machine.
- * - "port": integer <code>PP_Var</code>
- */
-typedef struct PP_Var PP_Ext_Socket_RecvFromInfo_Dev;
-
-/**
- * A dictionary <code>PP_Var</code> which contains
- * - "socketType" : string <code>PP_Var</code> which matches the description of
- * <code>PP_Ext_Socket_SocketType_Dev</code>
- * The type of the passed socket. This will be <code>tcp</code> or
- * <code>udp</code>.
- * - "connected" : boolean <code>PP_Var</code>
- * Whether or not the underlying socket is connected.
- *
- * For <code>tcp</code> sockets, this will remain true even if the remote peer
- * has disconnected. Reading or writing to the socket may then result in an
- * error, hinting that this socket should be disconnected via
- * <code>Disconnect()</code>.
- *
- * For <code>udp</code> sockets, this just represents whether a default remote
- * address has been specified for reading and writing packets.
- * - "peerAddress" : string or undefined <code>PP_Var</code>
- * If the underlying socket is connected, contains the IPv4/6 address of the
- * peer.
- * - "peerPort" : integer or undefined <code>PP_Var</code>
- * If the underlying socket is connected, contains the port of the connected
- * peer.
- * - "localAddress" : string or undefined <code>PP_Var</code>
- * If the underlying socket is bound or connected, contains its local IPv4/6
- * address.
- * - "localPort" : integer or undefined <code>PP_Var</code>
- * If the underlying socket is bound or connected, contains its local port.
- */
-typedef struct PP_Var PP_Ext_Socket_SocketInfo_Dev;
-
-/**
- * A dictionary <code>PP_Var</code> which contains
- * - "name" : string <code>PP_Var</code>
- * The underlying name of the adapter. On *nix, this will typically be "eth0",
- * "lo", etc.
- * - "address": string <code>PP_Var</code>
- * The available IPv4/6 address.
- */
-typedef struct PP_Var PP_Ext_Socket_NetworkInterface_Dev;
-
-/**
- * An array <code>PP_Var</code> which contains elements of
- * <code>PP_Ext_Socket_NetworkInterface_Dev</code>.
- */
-typedef struct PP_Var PP_Ext_Socket_NetworkInterface_Dev_Array;
-/**
- * @}
- */
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-struct PPB_Ext_Socket_Dev_0_2 {
- /**
- * Creates a socket of the specified type that will connect to the specified
- * remote machine.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] type A <code>PP_Ext_Socket_SocketType_Dev</code>. The type of
- * socket to create. Must be <code>tcp</code> or <code>udp</code>.
- * @param[in] options An undefined <code>PP_Var</code> or
- * <code>PP_Ext_Socket_CreateOptions_Dev</code>. The socket options.
- * @param[out] create_info A <code>PP_Ext_Socket_CreateInfo_Dev</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*Create)(PP_Instance instance,
- PP_Ext_Socket_SocketType_Dev type,
- PP_Ext_Socket_CreateOptions_Dev options,
- PP_Ext_Socket_CreateInfo_Dev* create_info,
- struct PP_CompletionCallback callback);
- /**
- * Destroys the socket. Each socket created should be destroyed after use.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- */
- void (*Destroy)(PP_Instance instance, struct PP_Var socket_id);
- /**
- * Connects the socket to the remote machine (for a <code>tcp</code> socket).
- * For a <code>udp</code> socket, this sets the default address which packets
- * are sent to and read from for <code>Read()</code> and <code>Write()</code>
- * calls.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] hostname A string <code>PP_Var</code>. The hostname or IP
- * address of the remote machine.
- * @param[in] port An integer <code>PP_Var</code>. The port of the remote
- * machine.
- * @param[out] result An integer <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*Connect)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var hostname,
- struct PP_Var port,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * Binds the local address for socket. Currently, it does not support TCP
- * socket.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] address A string <code>PP_Var</code>. The address of the local
- * machine.
- * @param[in] port An integer <code>PP_Var</code>. The port of the local
- * machine.
- * @param[out] result An integer <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*Bind)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var address,
- struct PP_Var port,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * Disconnects the socket. For UDP sockets, <code>Disconnect</code> is a
- * non-operation but is safe to call.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- */
- void (*Disconnect)(PP_Instance instance, struct PP_Var socket_id);
- /**
- * Reads data from the given connected socket.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] buffer_size An undefined or integer <code>PP_Var</code>. The
- * read buffer size.
- * @param[out] read_info A <code>PP_Ext_Socket_ReadInfo_Dev</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*Read)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var buffer_size,
- PP_Ext_Socket_ReadInfo_Dev* read_info,
- struct PP_CompletionCallback callback);
- /**
- * Writes data on the given connected socket.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] data An array buffer <code>PP_Var</code>. The data to write.
- * @param[out] write_info A <code>PP_Ext_Socket_WriteInfo_Dev</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*Write)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var data,
- PP_Ext_Socket_WriteInfo_Dev* write_info,
- struct PP_CompletionCallback callback);
- /**
- * Receives data from the given UDP socket.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] buffer_size An undefined or integer <code>PP_Var</code>. The
- * receive buffer size.
- * @param[out] recv_from_info A <code>PP_Ext_Socket_RecvFromInfo_Dev</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*RecvFrom)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var buffer_size,
- PP_Ext_Socket_RecvFromInfo_Dev* recv_from_info,
- struct PP_CompletionCallback callback);
- /**
- * Sends data on the given UDP socket to the given address and port.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] data An array buffer <code>PP_Var</code>.
- * @param[in] address A string <code>PP_Var</code>. The address of the remote
- * machine.
- * @param[in] port An integer <code>PP_Var</code>. The port of the remote
- * machine.
- * @param[out] write_info A <code>PP_Ext_Socket_WriteInfo_Dev</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*SendTo)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var data,
- struct PP_Var address,
- struct PP_Var port,
- PP_Ext_Socket_WriteInfo_Dev* write_info,
- struct PP_CompletionCallback callback);
- /**
- * This method applies to TCP sockets only.
- * Listens for connections on the specified port and address. This effectively
- * makes this a server socket, and client socket functions (Connect, Read,
- * Write) can no longer be used on this socket.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] address A string <code>PP_Var</code>. The address of the local
- * machine.
- * @param[in] port An integer <code>PP_Var</code>. The port of the local
- * machine.
- * @param[in] backlog An undefined or integer <code>PP_Var</code>. Length of
- * the socket's listen queue.
- * @param[out] result An integer <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*Listen)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var address,
- struct PP_Var port,
- struct PP_Var backlog,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * This method applies to TCP sockets only.
- * Registers a callback function to be called when a connection is accepted on
- * this listening server socket. Listen must be called first.
- * If there is already an active accept callback, this callback will be
- * invoked immediately with an error as the resultCode.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[out] accept_info A <code>PP_Ext_Socket_AcceptInfo_Dev</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*Accept)(PP_Instance instance,
- struct PP_Var socket_id,
- PP_Ext_Socket_AcceptInfo_Dev* accept_info,
- struct PP_CompletionCallback callback);
- /**
- * Enables or disables the keep-alive functionality for a TCP connection.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] enable A boolean <code>PP_Var</code>. If true, enable keep-alive
- * functionality.
- * @param[in] delay An undefined or integer <code>PP_Var</code>. Set the delay
- * seconds between the last data packet received and the first keepalive
- * probe. Default is 0.
- * @param[out] result A boolean <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*SetKeepAlive)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var enable,
- struct PP_Var delay,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * Sets or clears <code>TCP_NODELAY</code> for a TCP connection. Nagle's
- * algorithm will be disabled when <code>TCP_NODELAY</code> is set.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] no_delay A boolean <code>PP_Var</code>.
- * @param[out] result A boolean <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*SetNoDelay)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var no_delay,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * Retrieves the state of the given socket.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[out] result A <code>PP_Ext_Socket_SocketInfo_Dev</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*GetInfo)(PP_Instance instance,
- struct PP_Var socket_id,
- PP_Ext_Socket_SocketInfo_Dev* result,
- struct PP_CompletionCallback callback);
- /**
- * Retrieves information about local adapters on this system.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[out] result A <code>PP_Ext_Socket_NetworkInterface_Dev_Array</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*GetNetworkList)(PP_Instance instance,
- PP_Ext_Socket_NetworkInterface_Dev_Array* result,
- struct PP_CompletionCallback callback);
- /**
- * Joins the multicast group and starts to receive packets from that group.
- * The socket must be of UDP type and must be bound to a local port before
- * calling this method.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] address A string <code>PP_Var</code>. The group address to join.
- * Domain names are not supported.
- * @param[out] result An integer <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*JoinGroup)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var address,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * Leaves the multicast group previously joined using <code>JoinGroup</code>.
- * It's not necessary to leave the multicast group before destroying the
- * socket or exiting. This is automatically called by the OS.
- *
- * Leaving the group will prevent the router from sending multicast datagrams
- * to the local host, presuming no other process on the host is still joined
- * to the group.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] address A string <code>PP_Var</code>. The group address to
- * leave. Domain names are not supported.
- * @param[out] result An integer <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*LeaveGroup)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var address,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * Sets the time-to-live of multicast packets sent to the multicast group.
- *
- * Calling this method does not require multicast permissions.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] ttl An integer <code>PP_Var</code>. The time-to-live value.
- * @param[out] result An integer <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*SetMulticastTimeToLive)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var ttl,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * Sets whether multicast packets sent from the host to the multicast group
- * will be looped back to the host.
- *
- * Note: the behavior of <code>SetMulticastLoopbackMode</code> is slightly
- * different between Windows and Unix-like systems. The inconsistency
- * happens only when there is more than one application on the same host
- * joined to the same multicast group while having different settings on
- * multicast loopback mode. On Windows, the applications with loopback off
- * will not RECEIVE the loopback packets; while on Unix-like systems, the
- * applications with loopback off will not SEND the loopback packets to
- * other applications on the same host. See MSDN: http://goo.gl/6vqbj
- *
- * Calling this method does not require multicast permissions.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[in] enabled A boolean <code>PP_Var</code>. Indicates whether to
- * enable loopback mode.
- * @param[out] result An integer <code>PP_Var</code>.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*SetMulticastLoopbackMode)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var enabled,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- /**
- * Gets the multicast group addresses the socket is currently joined to.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- * @param[in] socket_id An integer <code>PP_Var</code>. The socket ID.
- * @param[out] groups An array <code>PP_Var</code> of string
- * <code>PP_Var</code>s.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called
- * upon completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- int32_t (*GetJoinedGroups)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var* groups,
- struct PP_CompletionCallback callback);
-};
-
-typedef struct PPB_Ext_Socket_Dev_0_2 PPB_Ext_Socket_Dev;
-
-struct PPB_Ext_Socket_Dev_0_1 {
- int32_t (*Create)(PP_Instance instance,
- PP_Ext_Socket_SocketType_Dev type,
- PP_Ext_Socket_CreateOptions_Dev options,
- PP_Ext_Socket_CreateInfo_Dev* create_info,
- struct PP_CompletionCallback callback);
- void (*Destroy)(PP_Instance instance, struct PP_Var socket_id);
- int32_t (*Connect)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var hostname,
- struct PP_Var port,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- int32_t (*Bind)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var address,
- struct PP_Var port,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- void (*Disconnect)(PP_Instance instance, struct PP_Var socket_id);
- int32_t (*Read)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var buffer_size,
- PP_Ext_Socket_ReadInfo_Dev* read_info,
- struct PP_CompletionCallback callback);
- int32_t (*Write)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var data,
- PP_Ext_Socket_WriteInfo_Dev* write_info,
- struct PP_CompletionCallback callback);
- int32_t (*RecvFrom)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var buffer_size,
- PP_Ext_Socket_RecvFromInfo_Dev* recv_from_info,
- struct PP_CompletionCallback callback);
- int32_t (*SendTo)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var data,
- struct PP_Var address,
- struct PP_Var port,
- PP_Ext_Socket_WriteInfo_Dev* write_info,
- struct PP_CompletionCallback callback);
- int32_t (*Listen)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var address,
- struct PP_Var port,
- struct PP_Var backlog,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- int32_t (*Accept)(PP_Instance instance,
- struct PP_Var socket_id,
- PP_Ext_Socket_AcceptInfo_Dev* accept_info,
- struct PP_CompletionCallback callback);
- int32_t (*SetKeepAlive)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var enable,
- struct PP_Var delay,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- int32_t (*SetNoDelay)(PP_Instance instance,
- struct PP_Var socket_id,
- struct PP_Var no_delay,
- struct PP_Var* result,
- struct PP_CompletionCallback callback);
- int32_t (*GetInfo)(PP_Instance instance,
- struct PP_Var socket_id,
- PP_Ext_Socket_SocketInfo_Dev* result,
- struct PP_CompletionCallback callback);
- int32_t (*GetNetworkList)(PP_Instance instance,
- PP_Ext_Socket_NetworkInterface_Dev_Array* result,
- struct PP_CompletionCallback callback);
-};
-/**
- * @}
- */
-
-#endif /* PPAPI_C_EXTENSIONS_DEV_PPB_EXT_SOCKET_DEV_H_ */
-
diff --git a/chromium/ppapi/c/pp_codecs.h b/chromium/ppapi/c/pp_codecs.h
new file mode 100644
index 00000000000..356a10bac4d
--- /dev/null
+++ b/chromium/ppapi/c/pp_codecs.h
@@ -0,0 +1,83 @@
+/* Copyright (c) 2014 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.
+ */
+
+/* From pp_codecs.idl modified Tue Jun 10 13:32:45 2014. */
+
+#ifndef PPAPI_C_PP_CODECS_H_
+#define PPAPI_C_PP_CODECS_H_
+
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
+
+/**
+ * @file
+ * Video profiles.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+typedef enum {
+ PP_VIDEOPROFILE_H264BASELINE = 0,
+ PP_VIDEOPROFILE_H264MAIN = 1,
+ PP_VIDEOPROFILE_H264EXTENDED = 2,
+ PP_VIDEOPROFILE_H264HIGH = 3,
+ PP_VIDEOPROFILE_H264HIGH10PROFILE = 4,
+ PP_VIDEOPROFILE_H264HIGH422PROFILE = 5,
+ PP_VIDEOPROFILE_H264HIGH444PREDICTIVEPROFILE = 6,
+ PP_VIDEOPROFILE_H264SCALABLEBASELINE = 7,
+ PP_VIDEOPROFILE_H264SCALABLEHIGH = 8,
+ PP_VIDEOPROFILE_H264STEREOHIGH = 9,
+ PP_VIDEOPROFILE_H264MULTIVIEWHIGH = 10,
+ PP_VIDEOPROFILE_VP8MAIN = 11,
+ PP_VIDEOPROFILE_VP9MAIN = 12,
+ PP_VIDEOPROFILE_MAX = PP_VIDEOPROFILE_VP9MAIN
+} PP_VideoProfile;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Structs
+ * @{
+ */
+/**
+ * Struct describing a decoded video picture. The decoded picture data is stored
+ * in the GL texture corresponding to |texture_id|. The plugin can determine
+ * which Decode call generated the picture using |decode_id|.
+ */
+struct PP_VideoPicture {
+ /**
+ * |decode_id| parameter of the Decode call which generated this picture.
+ * See the PPB_VideoDecoder function Decode() for more details.
+ */
+ uint32_t decode_id;
+ /**
+ * Texture ID in the plugin's GL context. The plugin can use this to render
+ * the decoded picture.
+ */
+ uint32_t texture_id;
+ /**
+ * The GL texture target for the decoded picture. Possible values are:
+ * GL_TEXTURE_2D (normalized texture coordinates)
+ * GL_TEXTURE_RECTANGLE_ARB (dimension dependent texture coordinates)
+ *
+ * The pixel format of the texture is GL_RGBA.
+ */
+ uint32_t texture_target;
+ /**
+ * Dimensions of the texture holding the decoded picture.
+ */
+ struct PP_Size texture_size;
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PP_CODECS_H_ */
+
diff --git a/chromium/ppapi/c/pp_errors.h b/chromium/ppapi/c/pp_errors.h
index d0411c6f70e..e65bb92144b 100644
--- a/chromium/ppapi/c/pp_errors.h
+++ b/chromium/ppapi/c/pp_errors.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From pp_errors.idl modified Thu Jun 13 13:02:05 2013. */
+/* From pp_errors.idl modified Thu May 15 16:12:26 2014. */
#ifndef PPAPI_C_PP_ERRORS_H_
#define PPAPI_C_PP_ERRORS_H_
@@ -86,6 +86,17 @@ enum {
* input events, and there are reentrancy and deadlock issues).
*/
PP_ERROR_BLOCKS_MAIN_THREAD = -13,
+ /**
+ * This value indicates that the plugin sent bad input data to a resource,
+ * leaving it in an invalid state. The resource can't be used after returning
+ * this error and should be released.
+ */
+ PP_ERROR_MALFORMED_INPUT = -14,
+ /**
+ * This value indicates that a resource has failed. The resource can't be
+ * used after returning this error and should be released.
+ */
+ PP_ERROR_RESOURCE_FAILED = -15,
/** This value indicates failure due to a file that does not exist. */
PP_ERROR_FILENOTFOUND = -20,
/** This value indicates failure due to a file that already exists. */
diff --git a/chromium/ppapi/c/pp_macros.h b/chromium/ppapi/c/pp_macros.h
index e143b2290e9..31d7297fd43 100644
--- a/chromium/ppapi/c/pp_macros.h
+++ b/chromium/ppapi/c/pp_macros.h
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-/* From pp_macros.idl modified Wed Mar 6 13:04:56 2013. */
+/* From pp_macros.idl modified Tue May 20 17:13:23 2014. */
#ifndef PPAPI_C_PP_MACROS_H_
#define PPAPI_C_PP_MACROS_H_
-#define PPAPI_RELEASE 33
+#define PPAPI_RELEASE 37
/**
* @file
@@ -95,22 +95,6 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, struct NAME, SIZE)
#define PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(NAME, SIZE) \
PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, enum NAME, SIZE)
-/* This is roughly copied from base/compiler_specific.h, and makes it possible
- to pass 'this' in a constructor initializer list, when you really mean it.
- E.g.:
- Foo::Foo(MyInstance* instance)
- : PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {}
- */
-#if defined(_MSC_VER)
-# define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) \
- __pragma(warning(push)) \
- __pragma(warning(disable:4355)) \
- code \
- __pragma(warning(pop))
-#else
-# define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) code
-#endif
-
/**
* @}
* End of addtogroup PP
diff --git a/chromium/ppapi/c/pp_rect.h b/chromium/ppapi/c/pp_rect.h
index 38825c33336..60002f8ecdc 100644
--- a/chromium/ppapi/c/pp_rect.h
+++ b/chromium/ppapi/c/pp_rect.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From pp_rect.idl modified Wed Oct 5 14:06:02 2011. */
+/* From pp_rect.idl modified Tue Jun 3 12:31:06 2014. */
#ifndef PPAPI_C_PP_RECT_H_
#define PPAPI_C_PP_RECT_H_
@@ -37,6 +37,20 @@ struct PP_Rect {
struct PP_Size size;
};
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16);
+
+/**
+ * The <code>PP_FloatRect</code> struct contains the size and location of a 2D
+ * rectangle.
+ */
+struct PP_FloatRect {
+ /**
+ * This value represents the x and y coordinates of the upper-left corner of
+ * the rectangle.
+ */
+ struct PP_FloatPoint point;
+ /** This value represents the width and height of the rectangle. */
+ struct PP_FloatSize size;
+};
/**
* @}
*/
@@ -69,6 +83,30 @@ PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y,
ret.size.height = h;
return ret;
}
+
+/**
+ * PP_MakeFloatRectFromXYWH() creates a <code>PP_FloatRect</code> given x and y
+ * coordinates and width and height dimensions as float values.
+ *
+ * @param[in] x An float value representing a horizontal coordinate of a
+ * point, starting with 0 as the left-most coordinate.
+ * @param[in] y An float value representing a vertical coordinate of a point,
+ * starting with 0 as the top-most coordinate.
+ * @param[in] w An float value representing a width.
+ * @param[in] h An float value representing a height.
+ *
+ * @return A <code>PP_FloatRect</code> structure.
+ */
+PP_INLINE struct PP_FloatRect PP_MakeFloatRectFromXYWH(float x, float y,
+ float w, float h) {
+ struct PP_FloatRect ret;
+ ret.point.x = x;
+ ret.point.y = y;
+ ret.size.width = w;
+ ret.size.height = h;
+ return ret;
+}
+
/**
* @}
*/
diff --git a/chromium/ppapi/c/pp_size.h b/chromium/ppapi/c/pp_size.h
index 117369cb9f8..fe87224a2d8 100644
--- a/chromium/ppapi/c/pp_size.h
+++ b/chromium/ppapi/c/pp_size.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From pp_size.idl modified Wed Oct 5 14:06:02 2011. */
+/* From pp_size.idl modified Tue Jun 3 12:31:20 2014. */
#ifndef PPAPI_C_PP_SIZE_H_
#define PPAPI_C_PP_SIZE_H_
@@ -31,6 +31,16 @@ struct PP_Size {
int32_t height;
};
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Size, 8);
+
+/**
+ * The <code>PP_FloatSize</code> struct contains the size of a 2D rectangle.
+ */
+struct PP_FloatSize {
+ /** This value represents the width of the rectangle. */
+ float width;
+ /** This value represents the height of the rectangle. */
+ float height;
+};
/**
* @}
*/
@@ -55,6 +65,22 @@ PP_INLINE struct PP_Size PP_MakeSize(int32_t w, int32_t h) {
ret.height = h;
return ret;
}
+
+/**
+ * PP_MakeFloatSize() creates a <code>PP_FloatSize</code> given a
+ * width and height as float values.
+ *
+ * @param[in] w An float value representing a width.
+ * @param[in] h An float value representing a height.
+ *
+ * @return A <code>PP_FloatSize</code> structure.
+ */
+PP_INLINE struct PP_FloatSize PP_MakeFloatSize(float w, float h) {
+ struct PP_FloatSize ret;
+ ret.width = w;
+ ret.height = h;
+ return ret;
+}
/**
* @}
*/
diff --git a/chromium/ppapi/c/pp_var.h b/chromium/ppapi/c/pp_var.h
index 0648c652c3c..15a8df69653 100644
--- a/chromium/ppapi/c/pp_var.h
+++ b/chromium/ppapi/c/pp_var.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From pp_var.idl modified Thu Sep 12 16:41:36 2013. */
+/* From pp_var.idl modified Thu Apr 10 14:52:30 2014. */
#ifndef PPAPI_C_PP_VAR_H_
#define PPAPI_C_PP_VAR_H_
@@ -54,28 +54,29 @@ typedef enum {
* The Var represents a string. The <code>as_id</code> field is used to
* identify the string, which may be created and retrieved from the
* <code>PPB_Var</code> interface. These objects are reference counted, so
- * AddRef and Release must be used properly to avoid memory leaks.
+ * AddRef() and Release() must be used properly to avoid memory leaks.
*/
PP_VARTYPE_STRING = 5,
/**
* Represents a JavaScript object. This vartype is not currently usable
* from modules, although it is used internally for some tasks. These objects
- * are reference counted, so AddRef and Release must be used properly to avoid
- * memory leaks.
+ * are reference counted, so AddRef() and Release() must be used properly to
+ * avoid memory leaks.
*/
PP_VARTYPE_OBJECT = 6,
/**
* Represents an array of Vars. The <code>as_id</code> field is used to
* identify the array, which may be created and manipulated from the
* <code>PPB_VarArray</code> interface. These objects are reference counted,
- * so AddRef and Release must be used properly to avoid memory leaks.
+ * so AddRef() and Release() must be used properly to avoid memory leaks.
*/
PP_VARTYPE_ARRAY = 7,
/**
* Represents a mapping from strings to Vars. The <code>as_id</code> field is
* used to identify the dictionary, which may be created and manipulated from
* the <code>PPB_VarDictionary</code> interface. These objects are reference
- * counted, so AddRef and Release must be used properly to avoid memory leaks.
+ * counted, so AddRef() and Release() must be used properly to avoid memory
+ * leaks.
*/
PP_VARTYPE_DICTIONARY = 8,
/**
@@ -83,14 +84,24 @@ typedef enum {
* represents Typed Arrays in JavaScript. Unlike JavaScript 'Array', it is
* only meant to contain basic numeric types, and is always stored
* contiguously. See PPB_VarArrayBuffer_Dev for functions special to
- * ArrayBuffer vars. These objects are reference counted, so AddRef and
- * Release must be used properly to avoid memory leaks.
+ * ArrayBuffer vars. These objects are reference counted, so AddRef() and
+ * Release() must be used properly to avoid memory leaks.
*/
PP_VARTYPE_ARRAY_BUFFER = 9,
/**
- * Resources are not currently supported but will be added in the future
- * These objects are reference counted, so AddRef and Release must be used
- * properly to avoid memory leaks.
+ * This type allows the <code>PP_Var</code> to wrap a <code>PP_Resource
+ * </code>. This can be useful for sending or receiving some types of
+ * <code>PP_Resource</code> using <code>PPB_Messaging</code> or
+ * <code>PPP_Messaging</code>.
+ *
+ * These objects are reference counted, so AddRef() and Release() must be used
+ * properly to avoid memory leaks. Under normal circumstances, the
+ * <code>PP_Var</code> will implicitly hold a reference count on the
+ * <code>PP_Resource</code> on your behalf. For example, if you call
+ * VarFromResource(), it implicitly calls PPB_Core::AddRefResource() on the
+ * <code>PP_Resource</code>. Likewise, PPB_Var::Release() on a Resource
+ * <code>PP_Var</code> will invoke PPB_Core::ReleaseResource() when the Var
+ * reference count goes to zero.
*/
PP_VARTYPE_RESOURCE = 10
} PP_VarType;
diff --git a/chromium/ppapi/c/ppb.h b/chromium/ppapi/c/ppb.h
index 4c228b000fc..cb6e6b4ffad 100644
--- a/chromium/ppapi/c/ppb.h
+++ b/chromium/ppapi/c/ppb.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb.idl modified Thu Mar 1 14:49:34 2012. */
+/* From ppb.idl modified Fri Jan 24 16:19:56 2014. */
#ifndef PPAPI_C_PPB_H_
#define PPAPI_C_PPB_H_
@@ -33,7 +33,7 @@
* <code>ppb.audio.h</code> or
* <code>PPB_GRAPHICS_2D_INTERFACE</code> in <code>ppb_graphics_2d.h</code>.
* Click
- * <a href="/native-client/{{pepperversion}}/pepperc/globals_defs"
+ * <a href="globals_defs.html"
* title="macros">here</a> for a complete list of interface
* names.
*
diff --git a/chromium/ppapi/c/ppb_audio.h b/chromium/ppapi/c/ppb_audio.h
index d41839a177d..edfb7f7723e 100644
--- a/chromium/ppapi/c/ppb_audio.h
+++ b/chromium/ppapi/c/ppb_audio.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_audio.idl modified Thu Aug 01 13:19:46 2013. */
+/* From ppb_audio.idl modified Fri Jan 24 16:18:44 2014. */
#ifndef PPAPI_C_PPB_AUDIO_H_
#define PPAPI_C_PPB_AUDIO_H_
@@ -61,7 +61,7 @@ typedef void (*PPB_Audio_Callback_1_0)(void* sample_buffer,
/**
* The <code>PPB_Audio</code> interface contains pointers to several functions
* for handling audio resources. Refer to the
- * <a href="/native-client/{{pepperversion}}/devguide/coding/audio">Audio</a>
+ * <a href="/native-client/devguide/coding/audio.html">Audio</a>
* chapter in the Developer's Guide for information on using this interface.
* Please see descriptions for each <code>PPB_Audio</code> and
* <code>PPB_AudioConfig</code> function for more details. A C example using
diff --git a/chromium/ppapi/c/ppb_audio_buffer.h b/chromium/ppapi/c/ppb_audio_buffer.h
new file mode 100644
index 00000000000..fe728a31585
--- /dev/null
+++ b/chromium/ppapi/c/ppb_audio_buffer.h
@@ -0,0 +1,156 @@
+/* Copyright 2014 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.
+ */
+
+/* From ppb_audio_buffer.idl modified Tue Mar 25 18:29:27 2014. */
+
+#ifndef PPAPI_C_PPB_AUDIO_BUFFER_H_
+#define PPAPI_C_PPB_AUDIO_BUFFER_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/pp_time.h"
+
+#define PPB_AUDIOBUFFER_INTERFACE_0_1 "PPB_AudioBuffer;0.1"
+#define PPB_AUDIOBUFFER_INTERFACE PPB_AUDIOBUFFER_INTERFACE_0_1
+
+/**
+ * @file
+ * Defines the <code>PPB_AudioBuffer</code> interface.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+/**
+ * PP_AudioBuffer_SampleRate is an enumeration of the different audio sample
+ * rates.
+ */
+typedef enum {
+ PP_AUDIOBUFFER_SAMPLERATE_UNKNOWN = 0,
+ PP_AUDIOBUFFER_SAMPLERATE_8000 = 8000,
+ PP_AUDIOBUFFER_SAMPLERATE_16000 = 16000,
+ PP_AUDIOBUFFER_SAMPLERATE_22050 = 22050,
+ PP_AUDIOBUFFER_SAMPLERATE_32000 = 32000,
+ PP_AUDIOBUFFER_SAMPLERATE_44100 = 44100,
+ PP_AUDIOBUFFER_SAMPLERATE_48000 = 48000,
+ PP_AUDIOBUFFER_SAMPLERATE_96000 = 96000,
+ PP_AUDIOBUFFER_SAMPLERATE_192000 = 192000
+} PP_AudioBuffer_SampleRate;
+
+/**
+ * PP_AudioBuffer_SampleSize is an enumeration of the different audio sample
+ * sizes.
+ */
+typedef enum {
+ PP_AUDIOBUFFER_SAMPLESIZE_UNKNOWN = 0,
+ PP_AUDIOBUFFER_SAMPLESIZE_16_BITS = 2
+} PP_AudioBuffer_SampleSize;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+struct PPB_AudioBuffer_0_1 {
+ /**
+ * Determines if a resource is an AudioBuffer resource.
+ *
+ * @param[in] resource The <code>PP_Resource</code> to test.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * resource is an AudioBuffer resource or <code>PP_FALSE</code> otherwise.
+ */
+ PP_Bool (*IsAudioBuffer)(PP_Resource resource);
+ /**
+ * Gets the timestamp of the audio buffer.
+ *
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
+ * buffer resource.
+ *
+ * @return A <code>PP_TimeDelta</code> containing the timestamp of the audio
+ * buffer. Given in seconds since the start of the containing audio stream.
+ */
+ PP_TimeDelta (*GetTimestamp)(PP_Resource buffer);
+ /**
+ * Sets the timestamp of the audio buffer.
+ *
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
+ * buffer resource.
+ * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
+ * of the audio buffer. Given in seconds since the start of the containing
+ * audio stream.
+ */
+ void (*SetTimestamp)(PP_Resource buffer, PP_TimeDelta timestamp);
+ /**
+ * Gets the sample rate of the audio buffer.
+ *
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
+ * buffer resource.
+ *
+ * @return The sample rate of the audio buffer.
+ */
+ PP_AudioBuffer_SampleRate (*GetSampleRate)(PP_Resource buffer);
+ /**
+ * Gets the sample size of the audio buffer.
+ *
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
+ * buffer resource.
+ *
+ * @return The sample size of the audio buffer.
+ */
+ PP_AudioBuffer_SampleSize (*GetSampleSize)(PP_Resource buffer);
+ /**
+ * Gets the number of channels in the audio buffer.
+ *
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
+ * buffer resource.
+ *
+ * @return The number of channels in the audio buffer.
+ */
+ uint32_t (*GetNumberOfChannels)(PP_Resource buffer);
+ /**
+ * Gets the number of samples in the audio buffer.
+ *
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
+ * buffer resource.
+ *
+ * @return The number of samples in the audio buffer.
+ * For example, at a sampling rate of 44,100 Hz in stereo audio, a buffer
+ * containing 4410 * 2 samples would have a duration of 100 milliseconds.
+ */
+ uint32_t (*GetNumberOfSamples)(PP_Resource buffer);
+ /**
+ * Gets the data buffer containing the audio samples.
+ *
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
+ * buffer resource.
+ *
+ * @return A pointer to the beginning of the data buffer.
+ */
+ void* (*GetDataBuffer)(PP_Resource buffer);
+ /**
+ * Gets the size of the data buffer in bytes.
+ *
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to an audio
+ * buffer resource.
+ *
+ * @return The size of the data buffer in bytes.
+ */
+ uint32_t (*GetDataBufferSize)(PP_Resource buffer);
+};
+
+typedef struct PPB_AudioBuffer_0_1 PPB_AudioBuffer;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_AUDIO_BUFFER_H_ */
+
diff --git a/chromium/ppapi/c/ppb_audio_config.h b/chromium/ppapi/c/ppb_audio_config.h
index a1e2e4b248e..87f861b62b8 100644
--- a/chromium/ppapi/c/ppb_audio_config.h
+++ b/chromium/ppapi/c/ppb_audio_config.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_audio_config.idl modified Thu Mar 28 10:07:11 2013. */
+/* From ppb_audio_config.idl modified Fri Jan 24 16:19:35 2014. */
#ifndef PPAPI_C_PPB_AUDIO_CONFIG_H_
#define PPAPI_C_PPB_AUDIO_CONFIG_H_
@@ -66,7 +66,7 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_AudioSampleRate, 4);
* This interface only supports 16-bit stereo output.
*
* Refer to the
- * <a href="/native-client/{{pepperversion}}/devguide/coding/audio">Audio
+ * <a href="/native-client/devguide/coding/audio.html">Audio
* </a> chapter in the Developer's Guide for information on using this
* interface.
*/
diff --git a/chromium/ppapi/c/ppb_compositor.h b/chromium/ppapi/c/ppb_compositor.h
new file mode 100644
index 00000000000..18c9760b06c
--- /dev/null
+++ b/chromium/ppapi/c/ppb_compositor.h
@@ -0,0 +1,148 @@
+/* Copyright 2014 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.
+ */
+
+/* From ppb_compositor.idl modified Tue Jun 3 12:44:44 2014. */
+
+#ifndef PPAPI_C_PPB_COMPOSITOR_H_
+#define PPAPI_C_PPB_COMPOSITOR_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_COMPOSITOR_INTERFACE_0_1 "PPB_Compositor;0.1" /* dev */
+/**
+ * @file
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * Defines the <code>PPB_Compositor</code> interface. Used for setting
+ * <code>PPB_CompositorLayer</code> layers to the Chromium compositor for
+ * compositing. This allows a plugin to combine different sources of visual
+ * data efficiently, such as <code>PPB_ImageData</code> images and
+ * OpenGL textures. See also <code>PPB_CompositorLayer</code> for more
+ * information.
+ * This interface is still in development (Dev API status) and may change,
+ * so is only supported on Dev channel and Canary currently.
+ *
+ * <strong>Example usage from plugin code:</strong>
+ *
+ * <strong>Setup:</strong>
+ * @code
+ * PP_Resource compositor;
+ * compositor = compositor_if->Create(instance);
+ * instance_if->BindGraphics(instance, compositor);
+ * @endcode
+ *
+ * <strong>Setup layer stack:</strong>
+ * @code
+ * PP_Resource color_layer = compositor_if->AddLayer(compositor);
+ * PP_Resource texture_layer = compositor_if->AddLayer(compositor);
+ * @endcode
+ *
+ * <strong> Present one frame:</strong>
+ * layer_if->SetColor(color_layer, 255, 255, 0, 255, PP_MakeSize(400, 400));
+ * PP_CompletionCallback release_callback = {
+ * TextureReleasedCallback, 0, PP_COMPLETIONCALLBACK_FLAG_NONE,
+ * };
+ * layer_if->SetTexture(texture_layer, graphics3d, texture_id,
+ * PP_MakeSize(300, 300), release_callback);
+ *
+ * PP_CompletionCallback callback = {
+ * DidFinishCommitLayersCallback,
+ * (void*) texture_id,
+ * PP_COMPLETIONCALLBACK_FLAG_NONE,
+ * };
+ * compositor_if->CommitLayers(compositor, callback);
+ * @endcode
+ *
+ * <strong>release callback</strong>
+ * void ReleaseCallback(int32_t result, void* user_data) {
+ * if (result == PP_OK) {
+ * uint32_t texture_id = (uint32_t) user_data;
+ * // reuse the texture or delete it.
+ * }
+ * }
+ *
+ * <strong>Shutdown:</strong>
+ * @code
+ * core->ReleaseResource(color_layer);
+ * core->ReleaseResource(texture_layer);
+ * core->ReleaseResource(compositor);
+ * @endcode
+ */
+struct PPB_Compositor_0_1 { /* dev */
+ /**
+ * Determines if a resource is a compositor resource.
+ *
+ * @param[in] resource The <code>PP_Resource</code> to test.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * resource is a compositor resource or <code>PP_FALSE</code> otherwise.
+ */
+ PP_Bool (*IsCompositor)(PP_Resource resource);
+ /**
+ * Creates a Compositor resource.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance
+ * of a module.
+ *
+ * @return A <code>PP_Resource</code> containing the compositor resource if
+ * sucessful or 0 otherwise.
+ */
+ PP_Resource (*Create)(PP_Instance instance);
+ /**
+ * Creates a new <code>PPB_CompositorLayer</code> and adds it to the end
+ * of the layer stack. A <code>PP_Resource</code> containing the layer is
+ * returned. It is uninitialized, <code>SetColor()</code>,
+ * <code>SetTexture</code> or <code>SetImage</code> should be used to
+ * initialize it. The layer will appear above other pre-existing layers.
+ * If <code>ResetLayers</code> is called or the <code>PPB_Compositor</code> is
+ * released, the returned layer will be invalidated, and any further calls on
+ * the layer will return <code>PP_ERROR_BADRESOURCE</code>.
+ *
+ * param[in] compositor A <code>PP_Resource</code> corresponding to
+ * a compositor layer resource.
+ *
+ * @return A <code>PP_Resource</code> containing the compositor layer
+ * resource if sucessful or 0 otherwise.
+ */
+ PP_Resource (*AddLayer)(PP_Resource compositor);
+ /**
+ * Commits layers added by <code>AddLayer()</code> to the chromium compositor.
+ *
+ * param[in] compositor A <code>PP_Resource</code> corresponding to
+ * a compositor layer resource.
+ * @param[in] cc A <code>PP_CompletionCallback</code> to be called when
+ * layers have been represented on screen.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*CommitLayers)(PP_Resource compositor,
+ struct PP_CompletionCallback cc);
+ /**
+ * Resets layers added by <code>AddLayer()</code>.
+ *
+ * param[in] compositor A <code>PP_Resource</code> corresponding to
+ * a compositor layer resource.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*ResetLayers)(PP_Resource compositor);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_COMPOSITOR_H_ */
+
diff --git a/chromium/ppapi/c/ppb_compositor_layer.h b/chromium/ppapi/c/ppb_compositor_layer.h
new file mode 100644
index 00000000000..8fcb1ab60f9
--- /dev/null
+++ b/chromium/ppapi/c/ppb_compositor_layer.h
@@ -0,0 +1,236 @@
+/* Copyright 2014 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.
+ */
+
+/* From ppb_compositor_layer.idl modified Wed Jun 4 11:17:54 2014. */
+
+#ifndef PPAPI_C_PPB_COMPOSITOR_LAYER_H_
+#define PPAPI_C_PPB_COMPOSITOR_LAYER_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_point.h"
+#include "ppapi/c/pp_rect.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_COMPOSITORLAYER_INTERFACE_0_1 "PPB_CompositorLayer;0.1" /* dev */
+/**
+ * @file
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+/**
+ * This enumeration contains blend modes used for computing the result pixels
+ * based on the source RGBA values in layers with the RGBA values that are
+ * already in the destination framebuffer.
+ * alpha_src, color_src: source alpha and color.
+ * alpha_dst, color_dst: destination alpha and color (before compositing).
+ * Below descriptions of the blend modes assume the colors are pre-multiplied.
+ * This interface is still in development (Dev API status) and may change,
+ * so is only supported on Dev channel and Canary currently.
+ */
+typedef enum {
+ /**
+ * No blending, copy source to the destination directly.
+ */
+ PP_BLENDMODE_NONE,
+ /**
+ * Source is placed over the destination.
+ * Resulting alpha = alpha_src + alpha_dst - alpha_src * alpha_dst
+ * Resulting color = color_src + color_dst * (1 - alpha_src)
+ */
+ PP_BLENDMODE_SRC_OVER,
+ /**
+ * The last blend mode.
+ */
+ PP_BLENDMODE_LAST = PP_BLENDMODE_SRC_OVER
+} PP_BlendMode;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * Defines the <code>PPB_CompositorLayer</code> interface. It is used by
+ * <code>PPB_Compositor</code>.
+ */
+struct PPB_CompositorLayer_0_1 { /* dev */
+ /**
+ * Determines if a resource is a compositor layer resource.
+ *
+ * @param[in] resource The <code>PP_Resource</code> to test.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * resource is a compositor layer resource or <code>PP_FALSE</code>
+ * otherwise.
+ */
+ PP_Bool (*IsCompositorLayer)(PP_Resource resource);
+ /**
+ * Sets the color of a solid color layer. If the layer is uninitialized,
+ * it will initialize the layer first, and then set its color.
+ * If the layer has been initialized to another kind of layer, the layer will
+ * not be changed, and <code>PP_ERROR_BADARGUMENT</code> will be returned.
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] red A <code>float</code> for the red color component. It will be
+ * clamped to [0, 1].
+ * param[in] green A <code>float</code> for the green color component. It will
+ * be clamped to [0, 1].
+ * param[in] blue A <code>float</code> for the blue color component. It will
+ * be clamped to [0, 1].
+ * param[in] alpha A <code>float</code> for the alpha color component. It will
+ * be clamped to [0, 1].
+ * param[in] size A <code>PP_Size</code> for the size of the layer before
+ * transform.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetColor)(PP_Resource layer,
+ float red,
+ float green,
+ float blue,
+ float alpha,
+ const struct PP_Size* size);
+ /**
+ * Sets the texture of a texture layer. If the layer is uninitialized,
+ * it will initialize the layer first, and then set its texture.
+ * The source rect will be set to ((0, 0), (1, 1)). If the layer has been
+ * initialized to another kind of layer, the layer will not be changed,
+ * and <code>PP_ERROR_BADARGUMENT</code> will be returned.
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] context A <code>PP_Resource</code> corresponding to a graphics
+ * 3d resource which owns the GL texture.
+ * param[in] texture A GL texture object id.
+ * param[in] size A <code>PP_Size</code> for the size of the layer before
+ * transform.
+ * param[in] cc A <code>PP_CompletionCallback</code> to be called when
+ * the texture is released by Chromium compositor.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetTexture)(PP_Resource layer,
+ PP_Resource context,
+ uint32_t texture,
+ const struct PP_Size* size,
+ struct PP_CompletionCallback cc);
+ /**
+ * Sets the image of an image layer. If the layer is uninitialized,
+ * it will initialize the layer first, and then set its image.
+ * The layer size will be set to the image's size. The source rect will be set
+ * to the full image. If the layer has been initialized to another kind of
+ * layer, the layer will not be changed, and <code>PP_ERROR_BADARGUMENT</code>
+ * will be returned.
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] image_data A <code>PP_Resource</code> corresponding to
+ * an image data resource.
+ * param[in] size A <code>PP_Size</code> for the size of the layer before
+ * transform. If NULL, the image's size will be used.
+ * param[in] cc A <code>PP_CompletionCallback</code> to be called when
+ * the image data is released by Chromium compositor.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetImage)(PP_Resource layer,
+ PP_Resource image_data,
+ const struct PP_Size* size,
+ struct PP_CompletionCallback cc);
+ /**
+ * Sets a clip rectangle for a compositor layer. The Chromium compositor
+ * applies a transform matrix on the layer first, and then clips the layer
+ * with the rectangle.
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] rect The clip rectangle. The origin is top-left corner of
+ * the plugin.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetClipRect)(PP_Resource layer, const struct PP_Rect* rect);
+ /**
+ * Sets a transform matrix which is used to composite the layer.
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] matrix A float array with 16 elements. The matrix is
+ * column major. The default transform matrix is an identity matrix.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetTransform)(PP_Resource layer, const float matrix[16]);
+ /**
+ * Sets the opacity value which will be applied to the layer. The effective
+ * value of each pixel is computed as:
+ *
+ * if (premult_alpha)
+ * pixel.rgb = pixel.rgb * opacity;
+ * pixel.a = pixel.a * opactiy;
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] opacity A <code>float</code> for the opacity value, The default
+ * value is 1.0f.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetOpacity)(PP_Resource layer, float opacity);
+ /**
+ * Sets the blend mode which is used to composite the layer.
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] mode A <code>PP_BlendMode</code>. The default mode is
+ * <code>PP_BLENDMODE_SRC_OVER</code>.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetBlendMode)(PP_Resource layer, PP_BlendMode mode);
+ /**
+ * Sets a source rectangle for a texture layer or an image layer.
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] rect A <code>PP_FloatRect</code> for an area of the source to
+ * consider. For a texture layer, rect is in uv coordinates. For an image
+ * layer, rect is in pixels. If the rect is beyond the dimensions of the
+ * texture or image, <code>PP_ERROR_BADARGUMENT</code> will be returned.
+ * If the layer size does not match the source rect size, bilinear scaling
+ * will be used.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetSourceRect)(PP_Resource layer, const struct PP_FloatRect* rect);
+ /**
+ * Sets the premultiplied alpha for an texture layer.
+ *
+ * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
+ * layer resource.
+ * param[in] premult A <code>PP_Bool</code> with <code>PP_TRUE</code> if
+ * pre-multiplied alpha is used.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*SetPremultipliedAlpha)(PP_Resource layer, PP_Bool premult);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_COMPOSITOR_LAYER_H_ */
+
diff --git a/chromium/ppapi/c/ppb_file_mapping.h b/chromium/ppapi/c/ppb_file_mapping.h
new file mode 100644
index 00000000000..3c1f87bf928
--- /dev/null
+++ b/chromium/ppapi/c/ppb_file_mapping.h
@@ -0,0 +1,147 @@
+/* Copyright 2014 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.
+ */
+
+/* From ppb_file_mapping.idl modified Mon Jan 27 11:00:43 2014. */
+
+#ifndef PPAPI_C_PPB_FILE_MAPPING_H_
+#define PPAPI_C_PPB_FILE_MAPPING_H_
+
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_FILEMAPPING_INTERFACE_0_1 "PPB_FileMapping;0.1" /* dev */
+/**
+ * @file
+ * This file defines methods for mapping and unmapping files into and out of
+ * memory.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+/**
+ * The PP_FileMapProtection values indicate the permissions requested for the
+ * file mapping. These should be used in a uint32_t bitfield.
+ */
+typedef enum {
+ /** Requests read access to the mapped address. */
+ PP_FILEMAPPROTECTION_READ = 1u << 0,
+ /** Requests write access to the mapped address. */
+ PP_FILEMAPPROTECTION_WRITE = 1u << 1
+} PP_FileMapProtection;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapProtection, 4);
+
+/**
+ * The PP_FileMapFlags contain flag values for use with Map().
+ */
+typedef enum {
+ /**
+ * Requests a shared mapping. If this flag is set, changes written to the
+ * memory region will be reflected in the underlying file and will thus
+ * eventually be visible to other processes which have opened the file. The
+ * file may not actually be updated until Unmap() is called. This is only
+ * valid if the PPB_FileIO resource was opened with write permission.
+ */
+ PP_FILEMAPFLAG_SHARED = 1u << 0,
+ /**
+ * Requests a copy-on-write mapping. If this flag is set, changes are not
+ * written to the underlying file, but only in the memory of the process
+ * (copy-on-write).
+ */
+ PP_FILEMAPFLAG_PRIVATE = 1u << 1,
+ /**
+ * Forces Map() to map the file contents at the provided |address|. If Map()
+ * can not comply, Map() will fail.
+ */
+ PP_FILEMAPFLAG_FIXED = 1u << 2
+} PP_FileMapFlags;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapFlags, 4);
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * PPB_FileMapping contains functions for mapping and unmapping files into and
+ * out of memory.
+ */
+struct PPB_FileMapping_0_1 { /* dev */
+ /**
+ * Map() maps the contents from an offset of the file into memory.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance of
+ * a module.
+ * @param[in] file_io A <code>PPB_FileIO</code> <code>PP_Resource</code>
+ * corresponding to the file that should be mapped in to memory.
+ * @param[in] length The number of bytes to map.
+ * @param[in] map_protection A bitfield containing values from
+ * <code>PP_FileMapProtection</code>, indicating what memory operations
+ * should be permitted on the mapped region.
+ * @param[in] map_flags A bitfield containing values from
+ * <code>PP_FileMapFlags</code>, providing options for the behavior of Map.
+ * If the region is to be writeable, then exactly one of
+ * <code>PP_FILEMAPFLAG_SHARED</code> or <code>PP_FILEMAPFLAG_PRIVATE</code>
+ * must be set.
+ * @param[in] offset The offset into the file. Must be a multiple of the
+ * Map page size as returned by GetMapPageSize().
+ * @param[inout] address The value of <code>*address</code>, if non-NULL,
+ * will be used as a hint to determine where in memory the file should be
+ * mapped. If the value is NULL, the host operating system will choose
+ * <code>address</code>. Upon Map() completing, <code>*address</code> will
+ * contain the actual memory location at which the file was mapped. If the
+ * plugin provides a non-NULL <code>*address</code>, it must be a multiple of
+ * the map page size as returned by GetMapPageSize().
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of Map().
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ */
+ int32_t (*Map)(PP_Instance instance,
+ PP_Resource file_io,
+ int64_t length,
+ uint32_t map_protection,
+ uint32_t map_flags,
+ int64_t offset,
+ void** address,
+ struct PP_CompletionCallback callback);
+ /**
+ * Unmap() deletes the mapping of the specified address. The specified
+ * address must have been retrieved with Map().
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance.
+ * @param[in] address The starting address of the address in memory to
+ * be unmapped.
+ * @param[in] length The length of the region to unmap.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of Unmap().
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ */
+ int32_t (*Unmap)(PP_Instance instance,
+ const void* address,
+ int64_t length,
+ struct PP_CompletionCallback callback);
+ /**
+ * GetMapPageSize() retrieves the size of pages that Map() uses.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance.
+ *
+ * @return The size of pages that Map() uses. Returns 0 on failure.
+ */
+ int64_t (*GetMapPageSize)(PP_Instance instance);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_FILE_MAPPING_H_ */
+
diff --git a/chromium/ppapi/c/ppb_file_ref.h b/chromium/ppapi/c/ppb_file_ref.h
index 873ef188868..b4f29552ecc 100644
--- a/chromium/ppapi/c/ppb_file_ref.h
+++ b/chromium/ppapi/c/ppb_file_ref.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_file_ref.idl modified Thu Aug 15 10:50:43 2013. */
+/* From ppb_file_ref.idl modified Wed Jan 29 20:50:29 2014. */
#ifndef PPAPI_C_PPB_FILE_REF_H_
#define PPAPI_C_PPB_FILE_REF_H_
@@ -20,7 +20,8 @@
#define PPB_FILEREF_INTERFACE_1_0 "PPB_FileRef;1.0"
#define PPB_FILEREF_INTERFACE_1_1 "PPB_FileRef;1.1"
-#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_1_1
+#define PPB_FILEREF_INTERFACE_1_2 "PPB_FileRef;1.2"
+#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_1_2
/**
* @file
@@ -30,6 +31,28 @@
/**
+ * @addtogroup Enums
+ * @{
+ */
+/**
+ * The <code>PP_MakeDirectoryFlags</code> enum contains flags used to control
+ * behavior of <code>PPB_FileRef.MakeDirectory()</code>.
+ */
+typedef enum {
+ PP_MAKEDIRECTORYFLAG_NONE = 0 << 0,
+ /** Requests that ancestor directories are created if they do not exist. */
+ PP_MAKEDIRECTORYFLAG_WITH_ANCESTORS = 1 << 0,
+ /**
+ * Requests that the PPB_FileRef.MakeDirectory() call fails if the directory
+ * already exists.
+ */
+ PP_MAKEDIRECTORYFLAG_EXCLUSIVE = 1 << 1
+} PP_MakeDirectoryFlags;
+/**
+ * @}
+ */
+
+/**
* @addtogroup Interfaces
* @{
*/
@@ -38,7 +61,7 @@
* a file system. This struct contains a <code>PP_FileSystemType</code>
* identifier and a file path string.
*/
-struct PPB_FileRef_1_1 {
+struct PPB_FileRef_1_2 {
/**
* Create() creates a weak pointer to a file in the given file system. File
* paths are POSIX style.
@@ -110,24 +133,22 @@ struct PPB_FileRef_1_1 {
*/
PP_Resource (*GetParent)(PP_Resource file_ref);
/**
- * MakeDirectory() makes a new directory in the file system as well as any
- * parent directories if the <code>make_ancestors</code> argument is
- * <code>PP_TRUE</code>. It is not valid to make a directory in the external
- * file system.
+ * MakeDirectory() makes a new directory in the file system according to the
+ * given <code>make_directory_flags</code>, which is a bit-mask of the
+ * <code>PP_MakeDirectoryFlags</code> values. It is not valid to make a
+ * directory in the external file system.
*
* @param[in] file_ref A <code>PP_Resource</code> corresponding to a file
* reference.
- * @param[in] make_ancestors A <code>PP_Bool</code> set to
- * <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code>
- * if ancestor directories are not needed.
+ * @param[in] make_directory_flags A bit-mask of the
+ * <code>PP_MakeDirectoryFlags</code> values.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of MakeDirectory().
*
* @return An int32_t containing an error code from <code>pp_errors.h</code>.
- * Succeeds if the directory already exists. Fails if ancestor directories
- * do not exist and <code>make_ancestors</code> was passed as
- * <code>PP_FALSE</code>.
*/
int32_t (*MakeDirectory)(PP_Resource directory_ref,
- PP_Bool make_ancestors,
+ int32_t make_directory_flags,
struct PP_CompletionCallback callback);
/**
* Touch() Updates time stamps for a file. You must have write access to the
@@ -212,7 +233,7 @@ struct PPB_FileRef_1_1 {
struct PP_CompletionCallback callback);
};
-typedef struct PPB_FileRef_1_1 PPB_FileRef;
+typedef struct PPB_FileRef_1_2 PPB_FileRef;
struct PPB_FileRef_1_0 {
PP_Resource (*Create)(PP_Resource file_system, const char* path);
@@ -234,6 +255,33 @@ struct PPB_FileRef_1_0 {
PP_Resource new_file_ref,
struct PP_CompletionCallback callback);
};
+
+struct PPB_FileRef_1_1 {
+ PP_Resource (*Create)(PP_Resource file_system, const char* path);
+ PP_Bool (*IsFileRef)(PP_Resource resource);
+ PP_FileSystemType (*GetFileSystemType)(PP_Resource file_ref);
+ struct PP_Var (*GetName)(PP_Resource file_ref);
+ struct PP_Var (*GetPath)(PP_Resource file_ref);
+ PP_Resource (*GetParent)(PP_Resource file_ref);
+ int32_t (*MakeDirectory)(PP_Resource directory_ref,
+ PP_Bool make_ancestors,
+ struct PP_CompletionCallback callback);
+ int32_t (*Touch)(PP_Resource file_ref,
+ PP_Time last_access_time,
+ PP_Time last_modified_time,
+ struct PP_CompletionCallback callback);
+ int32_t (*Delete)(PP_Resource file_ref,
+ struct PP_CompletionCallback callback);
+ int32_t (*Rename)(PP_Resource file_ref,
+ PP_Resource new_file_ref,
+ struct PP_CompletionCallback callback);
+ int32_t (*Query)(PP_Resource file_ref,
+ struct PP_FileInfo* info,
+ struct PP_CompletionCallback callback);
+ int32_t (*ReadDirectoryEntries)(PP_Resource file_ref,
+ struct PP_ArrayOutput output,
+ struct PP_CompletionCallback callback);
+};
/**
* @}
*/
diff --git a/chromium/ppapi/c/ppb_input_event.h b/chromium/ppapi/c/ppb_input_event.h
index 2624f0b9618..ca2bf152b9d 100644
--- a/chromium/ppapi/c/ppb_input_event.h
+++ b/chromium/ppapi/c/ppb_input_event.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_input_event.idl modified Tue Jul 23 19:23:51 2013. */
+/* From ppb_input_event.idl modified Thu Apr 3 14:52:10 2014. */
#ifndef PPAPI_C_PPB_INPUT_EVENT_H_
#define PPAPI_C_PPB_INPUT_EVENT_H_
@@ -29,8 +29,9 @@
#define PPB_WHEEL_INPUT_EVENT_INTERFACE PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0
#define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0 "PPB_KeyboardInputEvent;1.0"
+#define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_2 "PPB_KeyboardInputEvent;1.2"
#define PPB_KEYBOARD_INPUT_EVENT_INTERFACE \
- PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0
+ PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_2
#define PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0 "PPB_TouchInputEvent;1.0"
#define PPB_TOUCH_INPUT_EVENT_INTERFACE PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0
@@ -330,12 +331,10 @@ struct PPB_InputEvent_1_0 {
* the page.
*
* Note that synthetic mouse events will be generated from touch events if
- * (and only if) the you do not request touch events.
+ * (and only if) you do not request touch events.
*
* When requesting input events through this function, the events will be
- * delivered and <i>not</i> bubbled to the page. This means that even if you
- * aren't interested in the message, no other parts of the page will get
- * a crack at the message.
+ * delivered and <i>not</i> bubbled to the default handlers.
*
* <strong>Example:</strong>
* @code
@@ -368,8 +367,8 @@ struct PPB_InputEvent_1_0 {
* By default, no input events are delivered. In most cases you would
* register to receive events by calling RequestInputEvents(). In some cases,
* however, you may wish to filter events such that they can be bubbled up
- * to the DOM. In this case, register for those classes of events using
- * this function instead of RequestInputEvents().
+ * to the default handlers. In this case, register for those classes of
+ * events using this function instead of RequestInputEvents().
*
* Filtering input events requires significantly more overhead than just
* delivering them to the instance. As such, you should only request
@@ -695,7 +694,7 @@ typedef struct PPB_WheelInputEvent_1_0 PPB_WheelInputEvent;
* The <code>PPB_KeyboardInputEvent</code> interface contains pointers to
* several functions related to keyboard input events.
*/
-struct PPB_KeyboardInputEvent_1_0 {
+struct PPB_KeyboardInputEvent_1_2 {
/**
* Creates a keyboard input event with the given parameters. Normally you
* will get a keyboard event passed through the HandleInputEvent and will not
@@ -710,16 +709,19 @@ struct PPB_KeyboardInputEvent_1_0 {
* @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time
* when the event occurred.
*
- * @param[in] modifiers A bit field combination of the
+ * @param[in] modifiers A bit field combination of the
* <code>PP_InputEvent_Modifier</code> flags.
*
* @param[in] key_code This value reflects the DOM KeyboardEvent
- * <code>keyCode</code> field. Chrome populates this with the Windows-style
- * Virtual Key code of the key.
+ * <code>keyCode</code> field, which is the Windows-style Virtual Key
+ * code of the key.
*
* @param[in] character_text This value represents the typed character as a
* UTF-8 string.
*
+ * @param[in] code This value represents the DOM3 |code| string that
+ * corresponds to the physical key being pressed.
+ *
* @return A <code>PP_Resource</code> containing the new keyboard input
* event.
*/
@@ -728,7 +730,8 @@ struct PPB_KeyboardInputEvent_1_0 {
PP_TimeTicks time_stamp,
uint32_t modifiers,
uint32_t key_code,
- struct PP_Var character_text);
+ struct PP_Var character_text,
+ struct PP_Var code);
/**
* IsKeyboardInputEvent() determines if a resource is a keyboard event.
*
@@ -759,9 +762,31 @@ struct PPB_KeyboardInputEvent_1_0 {
* undefined var.
*/
struct PP_Var (*GetCharacterText)(PP_Resource character_event);
+ /**
+ * GetCode() returns the DOM |code| field for this keyboard event, as
+ * defined in the DOM3 Events spec:
+ * http://www.w3.org/TR/DOM-Level-3-Events/
+ *
+ * @param[in] key_event The key event for which to return the key code.
+ *
+ * @return The string that contains the DOM |code| for the keyboard event.
+ */
+ struct PP_Var (*GetCode)(PP_Resource key_event);
};
-typedef struct PPB_KeyboardInputEvent_1_0 PPB_KeyboardInputEvent;
+typedef struct PPB_KeyboardInputEvent_1_2 PPB_KeyboardInputEvent;
+
+struct PPB_KeyboardInputEvent_1_0 {
+ PP_Resource (*Create)(PP_Instance instance,
+ PP_InputEvent_Type type,
+ PP_TimeTicks time_stamp,
+ uint32_t modifiers,
+ uint32_t key_code,
+ struct PP_Var character_text);
+ PP_Bool (*IsKeyboardInputEvent)(PP_Resource resource);
+ uint32_t (*GetKeyCode)(PP_Resource key_event);
+ struct PP_Var (*GetCharacterText)(PP_Resource character_event);
+};
/**
* @}
*/
diff --git a/chromium/ppapi/c/ppb_media_stream_audio_track.h b/chromium/ppapi/c/ppb_media_stream_audio_track.h
new file mode 100644
index 00000000000..a57f9eb2c62
--- /dev/null
+++ b/chromium/ppapi/c/ppb_media_stream_audio_track.h
@@ -0,0 +1,215 @@
+/* Copyright 2014 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.
+ */
+
+/* From ppb_media_stream_audio_track.idl modified Wed May 28 09:36:15 2014. */
+
+#ifndef PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_
+#define PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/pp_var.h"
+
+#define PPB_MEDIASTREAMAUDIOTRACK_INTERFACE_0_1 "PPB_MediaStreamAudioTrack;0.1"
+#define PPB_MEDIASTREAMAUDIOTRACK_INTERFACE \
+ PPB_MEDIASTREAMAUDIOTRACK_INTERFACE_0_1
+
+/**
+ * @file
+ * Defines the <code>PPB_MediaStreamAudioTrack</code> interface. Used for
+ * receiving audio samples from a MediaStream audio track in the browser.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+/**
+ * This enumeration contains audio track attributes which are used by
+ * <code>Configure()</code>.
+ */
+typedef enum {
+ /**
+ * Attribute list terminator.
+ */
+ PP_MEDIASTREAMAUDIOTRACK_ATTRIB_NONE = 0,
+ /**
+ * The maximum number of buffers to hold audio samples.
+ * Note: this is only used as advisory; the browser may allocate more or fewer
+ * based on available resources. How many buffers depends on usage -
+ * request at least 2 to make sure latency doesn't cause lost samples. If
+ * the plugin expects to hold on to more than one buffer at a time (e.g. to do
+ * multi-buffer processing), it should request that many more.
+ */
+ PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS = 1,
+ /**
+ * The sample rate of audio data in buffers. The attribute value is a
+ * <code>PP_AudioBuffer_SampleRate</code>.
+ */
+ PP_MEDIASTREAMAUDIOTRACK_ATTRIB_SAMPLE_RATE = 2,
+ /**
+ * The sample size of audio data in buffers in bytes. The attribute value is a
+ * <code>PP_AudioBuffer_SampleSize</code>.
+ */
+ PP_MEDIASTREAMAUDIOTRACK_ATTRIB_SAMPLE_SIZE = 3,
+ /**
+ * The number of channels in audio buffers.
+ *
+ * Supported values: 1, 2
+ */
+ PP_MEDIASTREAMAUDIOTRACK_ATTRIB_CHANNELS = 4,
+ /**
+ * The duration of an audio buffer in milliseconds.
+ *
+ * Valid range: 10 to 10000
+ */
+ PP_MEDIASTREAMAUDIOTRACK_ATTRIB_DURATION = 5
+} PP_MediaStreamAudioTrack_Attrib;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+struct PPB_MediaStreamAudioTrack_0_1 {
+ /**
+ * Determines if a resource is a MediaStream audio track resource.
+ *
+ * @param[in] resource The <code>PP_Resource</code> to test.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * resource is a Mediastream audio track resource or <code>PP_FALSE</code>
+ * otherwise.
+ */
+ PP_Bool (*IsMediaStreamAudioTrack)(PP_Resource resource);
+ /**
+ * Configures underlying buffers for incoming audio samples.
+ * If the application doesn't want to drop samples, then the
+ * <code>PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS</code> should be
+ * chosen such that inter-buffer processing time variability won't overrun all
+ * the input buffers. If all buffers are filled, then samples will be
+ * dropped. The application can detect this by examining the timestamp on
+ * returned buffers. If <code>Configure()</code> is not called, default
+ * settings will be used. Calls to Configure while the plugin holds
+ * buffers will fail.
+ * Example usage from plugin code:
+ * @code
+ * int32_t attribs[] = {
+ * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS, 4,
+ * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_DURATION, 10,
+ * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_NONE};
+ * track_if->Configure(track, attribs, callback);
+ * @endcode
+ *
+ * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
+ * resource.
+ * @param[in] attrib_list A list of attribute name-value pairs in which each
+ * attribute is immediately followed by the corresponding desired value.
+ * The list is terminated by
+ * <code>PP_MEDIASTREAMAUDIOTRACK_ATTRIB_NONE</code>.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of <code>Configure()</code>.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*Configure)(PP_Resource audio_track,
+ const int32_t attrib_list[],
+ struct PP_CompletionCallback callback);
+ /**
+ * Gets attribute value for a given attribute name.
+ *
+ * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
+ * resource.
+ * @param[in] attrib A <code>PP_MediaStreamAudioTrack_Attrib</code> for
+ * querying.
+ * @param[out] value A int32_t for storing the attribute value on success.
+ * Otherwise, the value will not be changed.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*GetAttrib)(PP_Resource audio_track,
+ PP_MediaStreamAudioTrack_Attrib attrib,
+ int32_t* value);
+ /**
+ * Returns the track ID of the underlying MediaStream audio track.
+ *
+ * @param[in] audio_track The <code>PP_Resource</code> to check.
+ *
+ * @return A <code>PP_Var</code> containing the MediaStream track ID as
+ * a string.
+ */
+ struct PP_Var (*GetId)(PP_Resource audio_track);
+ /**
+ * Checks whether the underlying MediaStream track has ended.
+ * Calls to GetBuffer while the track has ended are safe to make and will
+ * complete, but will fail.
+ *
+ * @param[in] audio_track The <code>PP_Resource</code> to check.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * MediaStream track has ended or <code>PP_FALSE</code> otherwise.
+ */
+ PP_Bool (*HasEnded)(PP_Resource audio_track);
+ /**
+ * Gets the next audio buffer from the MediaStream track.
+ * If internal processing is slower than the incoming buffer rate, new buffers
+ * will be dropped from the incoming stream. Once all buffers are full,
+ * audio samples will be dropped until <code>RecycleBuffer()</code> is called
+ * to free a slot for another buffer.
+ * If there are no audio data in the input buffer,
+ * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the
+ * <code>callback</code> will be called, when a new buffer of audio samples
+ * is received or an error happens.
+ *
+ * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
+ * resource.
+ * @param[out] buffer A <code>PP_Resource</code> corresponding to
+ * an AudioBuffer resource.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of GetBuffer().
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*GetBuffer)(PP_Resource audio_track,
+ PP_Resource* buffer,
+ struct PP_CompletionCallback callback);
+ /**
+ * Recycles a buffer returned by <code>GetBuffer()</code>, so the track can
+ * reuse the buffer. And the buffer will become invalid. The caller should
+ * release all references it holds to <code>buffer</code> and not use it
+ * anymore.
+ *
+ * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
+ * resource.
+ * @param[in] buffer A <code>PP_Resource</code> corresponding to
+ * an AudioBuffer resource returned by <code>GetBuffer()</code>.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*RecycleBuffer)(PP_Resource audio_track, PP_Resource buffer);
+ /**
+ * Closes the MediaStream audio track and disconnects it from the audio
+ * source. After calling <code>Close()</code>, no new buffers will be
+ * received.
+ *
+ * @param[in] audio_track A <code>PP_Resource</code> corresponding to a
+ * MediaStream audio track resource.
+ */
+ void (*Close)(PP_Resource audio_track);
+};
+
+typedef struct PPB_MediaStreamAudioTrack_0_1 PPB_MediaStreamAudioTrack;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ */
+
diff --git a/chromium/ppapi/c/ppb_media_stream_video_track.h b/chromium/ppapi/c/ppb_media_stream_video_track.h
new file mode 100644
index 00000000000..31c7a803b94
--- /dev/null
+++ b/chromium/ppapi/c/ppb_media_stream_video_track.h
@@ -0,0 +1,275 @@
+/* Copyright 2014 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.
+ */
+
+/* From ppb_media_stream_video_track.idl modified Mon Apr 7 15:25:56 2014. */
+
+#ifndef PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_
+#define PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/pp_var.h"
+
+#define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1 "PPB_MediaStreamVideoTrack;0.1"
+#define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_1_0 \
+ "PPB_MediaStreamVideoTrack;1.0" /* dev */
+#define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE \
+ PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1
+
+/**
+ * @file
+ * Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for
+ * receiving video frames from a MediaStream video track in the browser.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+/**
+ * This enumeration contains video track attributes which are used by
+ * <code>Configure()</code>.
+ */
+typedef enum {
+ /**
+ * Attribute list terminator.
+ */
+ PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE = 0,
+ /**
+ * The maximum number of frames to hold in the input buffer.
+ * Note: this is only used as advisory; the browser may allocate more or fewer
+ * based on available resources. How many frames to buffer depends on usage -
+ * request at least 2 to make sure latency doesn't cause lost frames. If
+ * the plugin expects to hold on to more than one frame at a time (e.g. to do
+ * multi-frame processing), it should request that many more.
+ * If this attribute is not specified or value 0 is specified for this
+ * attribute, the default value will be used.
+ */
+ PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES = 1,
+ /**
+ * The width of video frames in pixels. It should be a multiple of 4.
+ * If the specified size is different from the video source (webcam),
+ * frames will be scaled to specified size.
+ * If this attribute is not specified or value 0 is specified, the original
+ * frame size of the video track will be used.
+ *
+ * Maximum value: 4096 (4K resolution).
+ */
+ PP_MEDIASTREAMVIDEOTRACK_ATTRIB_WIDTH = 2,
+ /**
+ * The height of video frames in pixels. It should be a multiple of 4.
+ * If the specified size is different from the video source (webcam),
+ * frames will be scaled to specified size.
+ * If this attribute is not specified or value 0 is specified, the original
+ * frame size of the video track will be used.
+ *
+ * Maximum value: 4096 (4K resolution).
+ */
+ PP_MEDIASTREAMVIDEOTRACK_ATTRIB_HEIGHT = 3,
+ /**
+ * The format of video frames. The attribute value is
+ * a <code>PP_VideoFrame_Format</code>. If the specified format is different
+ * from the video source (webcam), frames will be converted to specified
+ * format.
+ * If this attribute is not specified or value
+ * <code>PP_VIDEOFRAME_FORMAT_UNKNOWN</code> is specified, the orignal frame
+ * format of the video track will be used.
+ */
+ PP_MEDIASTREAMVIDEOTRACK_ATTRIB_FORMAT = 4
+} PP_MediaStreamVideoTrack_Attrib;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+struct PPB_MediaStreamVideoTrack_1_0 { /* dev */
+ /**
+ * Creates a PPB_MediaStreamVideoTrack resource for video output. Call this
+ * when you will be creating frames and putting them to the track.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance of
+ * a module.
+ *
+ * @return A <code>PP_Resource</code> corresponding to a
+ * PPB_MediaStreamVideoTrack resource if successful, 0 if failed.
+ */
+ PP_Resource (*Create)(PP_Instance instance);
+ /**
+ * Determines if a resource is a MediaStream video track resource.
+ *
+ * @param[in] resource The <code>PP_Resource</code> to test.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * resource is a Mediastream video track resource or <code>PP_FALSE</code>
+ * otherwise.
+ */
+ PP_Bool (*IsMediaStreamVideoTrack)(PP_Resource resource);
+ /**
+ * Configures underlying frame buffers for incoming frames.
+ * If the application doesn't want to drop frames, then the
+ * <code>PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES</code> should be
+ * chosen such that inter-frame processing time variability won't overrun the
+ * input buffer. If the buffer is overfilled, then frames will be dropped.
+ * The application can detect this by examining the timestamp on returned
+ * frames. If some attributes are not specified, default values will be used
+ * for those unspecified attributes. If <code>Configure()</code> is not
+ * called, default settings will be used.
+ * Example usage from plugin code:
+ * @code
+ * int32_t attribs[] = {
+ * PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES, 4,
+ * PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE};
+ * track_if->Configure(track, attribs, callback);
+ * @endcode
+ *
+ * @param[in] video_track A <code>PP_Resource</code> corresponding to a video
+ * resource.
+ * @param[in] attrib_list A list of attribute name-value pairs in which each
+ * attribute is immediately followed by the corresponding desired value.
+ * The list is terminated by
+ * <code>PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE</code>.
+ * @param[in] callback <code>PP_CompletionCallback</code> to be called upon
+ * completion of <code>Configure()</code>.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ * Returns <code>PP_ERROR_INPROGRESS</code> if there is a pending call of
+ * <code>Configure()</code> or <code>GetFrame()</code>, or the plugin
+ * holds some frames which are not recycled with <code>RecycleFrame()</code>.
+ * If an error is returned, all attributes and the underlying buffer will not
+ * be changed.
+ */
+ int32_t (*Configure)(PP_Resource video_track,
+ const int32_t attrib_list[],
+ struct PP_CompletionCallback callback);
+ /**
+ * Gets attribute value for a given attribute name.
+ *
+ * @param[in] video_track A <code>PP_Resource</code> corresponding to a video
+ * resource.
+ * @param[in] attrib A <code>PP_MediaStreamVideoTrack_Attrib</code> for
+ * querying.
+ * @param[out] value A int32_t for storing the attribute value on success.
+ * Otherwise, the value will not be changed.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*GetAttrib)(PP_Resource video_track,
+ PP_MediaStreamVideoTrack_Attrib attrib,
+ int32_t* value);
+ /**
+ * Returns the track ID of the underlying MediaStream video track.
+ *
+ * @param[in] video_track The <code>PP_Resource</code> to check.
+ *
+ * @return A <code>PP_Var</code> containing the MediaStream track ID as
+ * a string.
+ */
+ struct PP_Var (*GetId)(PP_Resource video_track);
+ /**
+ * Checks whether the underlying MediaStream track has ended.
+ * Calls to GetFrame while the track has ended are safe to make and will
+ * complete, but will fail.
+ *
+ * @param[in] video_track The <code>PP_Resource</code> to check.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * MediaStream track has ended or <code>PP_FALSE</code> otherwise.
+ */
+ PP_Bool (*HasEnded)(PP_Resource video_track);
+ /**
+ * Gets the next video frame from the MediaStream track.
+ * If internal processing is slower than the incoming frame rate, new frames
+ * will be dropped from the incoming stream. Once the input buffer is full,
+ * frames will be dropped until <code>RecycleFrame()</code> is called to free
+ * a spot for another frame to be buffered.
+ * If there are no frames in the input buffer,
+ * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the
+ * <code>callback</code> will be called when a new frame is received or an
+ * error happens.
+ *
+ * @param[in] video_track A <code>PP_Resource</code> corresponding to a video
+ * resource.
+ * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame
+ * resource.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of GetFrame().
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer
+ * was not allocated successfully.
+ */
+ int32_t (*GetFrame)(PP_Resource video_track,
+ PP_Resource* frame,
+ struct PP_CompletionCallback callback);
+ /**
+ * Recycles a frame returned by <code>GetFrame()</code>, so the track can
+ * reuse the underlying buffer of this frame. And the frame will become
+ * invalid. The caller should release all references it holds to
+ * <code>frame</code> and not use it anymore.
+ *
+ * @param[in] video_track A <code>PP_Resource</code> corresponding to a video
+ * resource.
+ * @param[in] frame A <code>PP_Resource</code> corresponding to a VideoFrame
+ * resource returned by <code>GetFrame()</code>.
+ *
+ * @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ */
+ int32_t (*RecycleFrame)(PP_Resource video_track, PP_Resource frame);
+ /**
+ * Closes the MediaStream video track and disconnects it from video source.
+ * After calling <code>Close()</code>, no new frames will be received.
+ *
+ * @param[in] video_track A <code>PP_Resource</code> corresponding to a
+ * MediaStream video track resource.
+ */
+ void (*Close)(PP_Resource video_track);
+ /**
+ * Gets a free frame for output. The frame is allocated by
+ * <code>Configure()</code>. The caller should fill it with frame data, and
+ * then use |PutFrame()| to send the frame back.
+ */
+ int32_t (*GetEmptyFrame)(PP_Resource video_track,
+ PP_Resource* frame,
+ struct PP_CompletionCallback callback);
+ /**
+ * Sends a frame returned by |GetEmptyFrame()| to the output track.
+ * After this function, the |frame| should not be used anymore and the
+ * caller should release the reference that it holds.
+ */
+ int32_t (*PutFrame)(PP_Resource video_track, PP_Resource frame);
+};
+
+struct PPB_MediaStreamVideoTrack_0_1 {
+ PP_Bool (*IsMediaStreamVideoTrack)(PP_Resource resource);
+ int32_t (*Configure)(PP_Resource video_track,
+ const int32_t attrib_list[],
+ struct PP_CompletionCallback callback);
+ int32_t (*GetAttrib)(PP_Resource video_track,
+ PP_MediaStreamVideoTrack_Attrib attrib,
+ int32_t* value);
+ struct PP_Var (*GetId)(PP_Resource video_track);
+ PP_Bool (*HasEnded)(PP_Resource video_track);
+ int32_t (*GetFrame)(PP_Resource video_track,
+ PP_Resource* frame,
+ struct PP_CompletionCallback callback);
+ int32_t (*RecycleFrame)(PP_Resource video_track, PP_Resource frame);
+ void (*Close)(PP_Resource video_track);
+};
+
+typedef struct PPB_MediaStreamVideoTrack_0_1 PPB_MediaStreamVideoTrack;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */
+
diff --git a/chromium/ppapi/c/ppb_message_loop.h b/chromium/ppapi/c/ppb_message_loop.h
index 0ddce165c15..26725bcf3ea 100644
--- a/chromium/ppapi/c/ppb_message_loop.h
+++ b/chromium/ppapi/c/ppb_message_loop.h
@@ -76,8 +76,8 @@
* The main thread has an implicitly created message loop. The main thread is
* the thread where PPP_InitializeModule and PPP_Instance functions are called.
* You can retrieve a reference to this message loop by calling
- * GetForMainThread() or, if your code is on the main thread,
- * GetForCurrentThread() will also work.
+ * GetForMainThread() or, if your code is on the main thread, GetCurrent() will
+ * also work.
*
* Some special threads created by the system can not have message loops. In
* particular, the background thread created for audio processing has this
diff --git a/chromium/ppapi/c/ppb_messaging.h b/chromium/ppapi/c/ppb_messaging.h
index 06e31205167..c361d1488bc 100644
--- a/chromium/ppapi/c/ppb_messaging.h
+++ b/chromium/ppapi/c/ppb_messaging.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_messaging.idl modified Wed Jun 5 10:32:59 2013. */
+/* From ppb_messaging.idl modified Fri Jun 13 15:28:26 2014. */
#ifndef PPAPI_C_PPB_MESSAGING_H_
#define PPAPI_C_PPB_MESSAGING_H_
@@ -11,10 +11,13 @@
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
+#include "ppapi/c/ppp_message_handler.h"
#define PPB_MESSAGING_INTERFACE_1_0 "PPB_Messaging;1.0"
+#define PPB_MESSAGING_INTERFACE_1_1 "PPB_Messaging;1.1" /* dev */
#define PPB_MESSAGING_INTERFACE PPB_MESSAGING_INTERFACE_1_0
/**
@@ -34,7 +37,7 @@
* and is related to sending messages to JavaScript message event listeners on
* the DOM element associated with specific module instance.
*/
-struct PPB_Messaging_1_0 {
+struct PPB_Messaging_1_1 { /* dev */
/**
* PostMessage() asynchronously invokes any listeners for message events on
* the DOM element for the given module instance. A call to PostMessage()
@@ -96,6 +99,66 @@ struct PPB_Messaging_1_0 {
* The browser will pop-up an alert saying "Hello world!"
*/
void (*PostMessage)(PP_Instance instance, struct PP_Var message);
+ /**
+ * Registers a handler for receiving messages from JavaScript. If a handler
+ * is registered this way, it will replace PPP_Messaging, and all messages
+ * sent from JavaScript via postMessage and postMessageAndAwaitResponse will
+ * be dispatched to <code>handler</code>.
+ *
+ * The function calls will be dispatched via <code>message_loop</code>. This
+ * means that the functions will be invoked on the thread to which
+ * <code>message_loop</code> is attached, when <code>message_loop</code> is
+ * run. It is illegal to pass the main thread message loop;
+ * RegisterMessageHandler will return PP_ERROR_WRONG_THREAD in that case.
+ * If you quit <code>message_loop</code> before calling Unregister(),
+ * the browser will not be able to call functions in the plugin's message
+ * handler any more. That could mean missing some messages or could cause a
+ * leak if you depend on Destroy() to free hander data. So you should,
+ * whenever possible, Unregister() the handler prior to quitting its event
+ * loop.
+ *
+ * Attempting to register a message handler when one is already registered
+ * will cause the current MessageHandler to be unregistered and replaced. In
+ * that case, no messages will be sent to the "default" message handler
+ * (PPP_Messaging). Messages will stop arriving at the prior message handler
+ * and will begin to be dispatched at the new message handler.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance
+ * of a module.
+ * @param[in] user_data A pointer the plugin may choose to use when handling
+ * calls to functions within PPP_MessageHandler. The browser will pass this
+ * same pointer when invoking functions within PPP_MessageHandler.
+ * @param[in] handler The plugin-provided set of functions for handling
+ * messages.
+ * @param[in] message_loop Represents the message loop on which
+ * PPP_MessageHandler functions should be invoked.
+ * @return PP_OK on success, or an error from pp_errors.h.
+ */
+ int32_t (*RegisterMessageHandler)(
+ PP_Instance instance,
+ void* user_data,
+ const struct PPP_MessageHandler_0_1* handler,
+ PP_Resource message_loop);
+ /**
+ * Unregisters the current message handler for <code>instance</code> if one
+ * is registered. After this call, the message handler (if one was
+ * registered) will have "Destroy" called on it and will receive no further
+ * messages after that point. After that point, all messages sent from
+ * JavaScript using postMessage() will be dispatched to PPP_Messaging (if
+ * the plugin supports PPP_MESSAGING_INTERFACE). Attempts to call
+ * postMessageAndAwaitResponse() from JavaScript will fail.
+ *
+ * Attempting to unregister a message handler when none is registered has no
+ * effect.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance
+ * of a module.
+ */
+ void (*UnregisterMessageHandler)(PP_Instance instance);
+};
+
+struct PPB_Messaging_1_0 {
+ void (*PostMessage)(PP_Instance instance, struct PP_Var message);
};
typedef struct PPB_Messaging_1_0 PPB_Messaging;
diff --git a/chromium/ppapi/c/ppb_opengles2.h b/chromium/ppapi/c/ppb_opengles2.h
index fbfe846823b..7f876e199ff 100644
--- a/chromium/ppapi/c/ppb_opengles2.h
+++ b/chromium/ppapi/c/ppb_opengles2.h
@@ -1,9 +1,11 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 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.
// This file is auto-generated from
// gpu/command_buffer/build_gles2_cmd_buffer.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
// DO NOT EDIT!
// OpenGL ES interface.
@@ -13,23 +15,28 @@
#include "ppapi/c/pp_resource.h"
#ifndef __gl2_h_
-typedef unsigned int GLenum;
typedef void GLvoid;
-typedef long int GLintptr;
typedef int GLsizei;
-typedef long int GLsizeiptr;
+typedef unsigned short GLushort;
+typedef short GLshort;
+typedef unsigned char GLubyte;
+typedef unsigned int GLenum;
typedef int GLint;
typedef unsigned char GLboolean;
-typedef unsigned int GLuint;
typedef unsigned int GLbitfield;
-typedef short GLshort;
typedef float GLfloat;
typedef float GLclampf;
typedef signed char GLbyte;
-typedef unsigned char GLubyte;
+typedef unsigned int GLuint;
typedef int GLfixed;
-typedef unsigned short GLushort;
typedef int GLclampx;
+#ifdef _WIN64
+typedef long long int GLintptr;
+typedef long long int GLsizeiptr;
+#else
+typedef long int GLintptr;
+typedef long int GLsizeiptr;
+#endif // _WIN64
#endif // __gl2_h_
#define PPB_OPENGLES2_INTERFACE_1_0 "PPB_OpenGLES2;1.0"
@@ -38,151 +45,249 @@ typedef int GLclampx;
struct PPB_OpenGLES2 {
void (*ActiveTexture)(PP_Resource context, GLenum texture);
void (*AttachShader)(PP_Resource context, GLuint program, GLuint shader);
- void (*BindAttribLocation)(
- PP_Resource context, GLuint program, GLuint index, const char* name);
+ void (*BindAttribLocation)(PP_Resource context,
+ GLuint program,
+ GLuint index,
+ const char* name);
void (*BindBuffer)(PP_Resource context, GLenum target, GLuint buffer);
- void (*BindFramebuffer)(
- PP_Resource context, GLenum target, GLuint framebuffer);
- void (*BindRenderbuffer)(
- PP_Resource context, GLenum target, GLuint renderbuffer);
+ void (*BindFramebuffer)(PP_Resource context,
+ GLenum target,
+ GLuint framebuffer);
+ void (*BindRenderbuffer)(PP_Resource context,
+ GLenum target,
+ GLuint renderbuffer);
void (*BindTexture)(PP_Resource context, GLenum target, GLuint texture);
- void (*BlendColor)(
- PP_Resource context, GLclampf red, GLclampf green, GLclampf blue,
- GLclampf alpha);
+ void (*BlendColor)(PP_Resource context,
+ GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha);
void (*BlendEquation)(PP_Resource context, GLenum mode);
- void (*BlendEquationSeparate)(
- PP_Resource context, GLenum modeRGB, GLenum modeAlpha);
+ void (*BlendEquationSeparate)(PP_Resource context,
+ GLenum modeRGB,
+ GLenum modeAlpha);
void (*BlendFunc)(PP_Resource context, GLenum sfactor, GLenum dfactor);
- void (*BlendFuncSeparate)(
- PP_Resource context, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha,
- GLenum dstAlpha);
- void (*BufferData)(
- PP_Resource context, GLenum target, GLsizeiptr size, const void* data,
- GLenum usage);
- void (*BufferSubData)(
- PP_Resource context, GLenum target, GLintptr offset, GLsizeiptr size,
- const void* data);
+ void (*BlendFuncSeparate)(PP_Resource context,
+ GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha);
+ void (*BufferData)(PP_Resource context,
+ GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage);
+ void (*BufferSubData)(PP_Resource context,
+ GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data);
GLenum (*CheckFramebufferStatus)(PP_Resource context, GLenum target);
void (*Clear)(PP_Resource context, GLbitfield mask);
- void (*ClearColor)(
- PP_Resource context, GLclampf red, GLclampf green, GLclampf blue,
- GLclampf alpha);
+ void (*ClearColor)(PP_Resource context,
+ GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha);
void (*ClearDepthf)(PP_Resource context, GLclampf depth);
void (*ClearStencil)(PP_Resource context, GLint s);
- void (*ColorMask)(
- PP_Resource context, GLboolean red, GLboolean green, GLboolean blue,
- GLboolean alpha);
+ void (*ColorMask)(PP_Resource context,
+ GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha);
void (*CompileShader)(PP_Resource context, GLuint shader);
- void (*CompressedTexImage2D)(
- PP_Resource context, GLenum target, GLint level, GLenum internalformat,
- GLsizei width, GLsizei height, GLint border, GLsizei imageSize,
- const void* data);
- void (*CompressedTexSubImage2D)(
- PP_Resource context, GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLsizei width, GLsizei height, GLenum format,
- GLsizei imageSize, const void* data);
- void (*CopyTexImage2D)(
- PP_Resource context, GLenum target, GLint level, GLenum internalformat,
- GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
- void (*CopyTexSubImage2D)(
- PP_Resource context, GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void (*CompressedTexImage2D)(PP_Resource context,
+ GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data);
+ void (*CompressedTexSubImage2D)(PP_Resource context,
+ GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data);
+ void (*CopyTexImage2D)(PP_Resource context,
+ GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border);
+ void (*CopyTexSubImage2D)(PP_Resource context,
+ GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
GLuint (*CreateProgram)(PP_Resource context);
GLuint (*CreateShader)(PP_Resource context, GLenum type);
void (*CullFace)(PP_Resource context, GLenum mode);
void (*DeleteBuffers)(PP_Resource context, GLsizei n, const GLuint* buffers);
- void (*DeleteFramebuffers)(
- PP_Resource context, GLsizei n, const GLuint* framebuffers);
+ void (*DeleteFramebuffers)(PP_Resource context,
+ GLsizei n,
+ const GLuint* framebuffers);
void (*DeleteProgram)(PP_Resource context, GLuint program);
- void (*DeleteRenderbuffers)(
- PP_Resource context, GLsizei n, const GLuint* renderbuffers);
+ void (*DeleteRenderbuffers)(PP_Resource context,
+ GLsizei n,
+ const GLuint* renderbuffers);
void (*DeleteShader)(PP_Resource context, GLuint shader);
- void (*DeleteTextures)(
- PP_Resource context, GLsizei n, const GLuint* textures);
+ void (*DeleteTextures)(PP_Resource context,
+ GLsizei n,
+ const GLuint* textures);
void (*DepthFunc)(PP_Resource context, GLenum func);
void (*DepthMask)(PP_Resource context, GLboolean flag);
void (*DepthRangef)(PP_Resource context, GLclampf zNear, GLclampf zFar);
void (*DetachShader)(PP_Resource context, GLuint program, GLuint shader);
void (*Disable)(PP_Resource context, GLenum cap);
void (*DisableVertexAttribArray)(PP_Resource context, GLuint index);
- void (*DrawArrays)(
- PP_Resource context, GLenum mode, GLint first, GLsizei count);
- void (*DrawElements)(
- PP_Resource context, GLenum mode, GLsizei count, GLenum type,
- const void* indices);
+ void (*DrawArrays)(PP_Resource context,
+ GLenum mode,
+ GLint first,
+ GLsizei count);
+ void (*DrawElements)(PP_Resource context,
+ GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices);
void (*Enable)(PP_Resource context, GLenum cap);
void (*EnableVertexAttribArray)(PP_Resource context, GLuint index);
void (*Finish)(PP_Resource context);
void (*Flush)(PP_Resource context);
- void (*FramebufferRenderbuffer)(
- PP_Resource context, GLenum target, GLenum attachment,
- GLenum renderbuffertarget, GLuint renderbuffer);
- void (*FramebufferTexture2D)(
- PP_Resource context, GLenum target, GLenum attachment, GLenum textarget,
- GLuint texture, GLint level);
+ void (*FramebufferRenderbuffer)(PP_Resource context,
+ GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer);
+ void (*FramebufferTexture2D)(PP_Resource context,
+ GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level);
void (*FrontFace)(PP_Resource context, GLenum mode);
void (*GenBuffers)(PP_Resource context, GLsizei n, GLuint* buffers);
void (*GenerateMipmap)(PP_Resource context, GLenum target);
- void (*GenFramebuffers)(
- PP_Resource context, GLsizei n, GLuint* framebuffers);
- void (*GenRenderbuffers)(
- PP_Resource context, GLsizei n, GLuint* renderbuffers);
+ void (*GenFramebuffers)(PP_Resource context, GLsizei n, GLuint* framebuffers);
+ void (*GenRenderbuffers)(PP_Resource context,
+ GLsizei n,
+ GLuint* renderbuffers);
void (*GenTextures)(PP_Resource context, GLsizei n, GLuint* textures);
- void (*GetActiveAttrib)(
- PP_Resource context, GLuint program, GLuint index, GLsizei bufsize,
- GLsizei* length, GLint* size, GLenum* type, char* name);
- void (*GetActiveUniform)(
- PP_Resource context, GLuint program, GLuint index, GLsizei bufsize,
- GLsizei* length, GLint* size, GLenum* type, char* name);
- void (*GetAttachedShaders)(
- PP_Resource context, GLuint program, GLsizei maxcount, GLsizei* count,
- GLuint* shaders);
- GLint (*GetAttribLocation)(
- PP_Resource context, GLuint program, const char* name);
+ void (*GetActiveAttrib)(PP_Resource context,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name);
+ void (*GetActiveUniform)(PP_Resource context,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name);
+ void (*GetAttachedShaders)(PP_Resource context,
+ GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders);
+ GLint (*GetAttribLocation)(PP_Resource context,
+ GLuint program,
+ const char* name);
void (*GetBooleanv)(PP_Resource context, GLenum pname, GLboolean* params);
- void (*GetBufferParameteriv)(
- PP_Resource context, GLenum target, GLenum pname, GLint* params);
+ void (*GetBufferParameteriv)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ GLint* params);
GLenum (*GetError)(PP_Resource context);
void (*GetFloatv)(PP_Resource context, GLenum pname, GLfloat* params);
- void (*GetFramebufferAttachmentParameteriv)(
- PP_Resource context, GLenum target, GLenum attachment, GLenum pname,
- GLint* params);
+ void (*GetFramebufferAttachmentParameteriv)(PP_Resource context,
+ GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params);
void (*GetIntegerv)(PP_Resource context, GLenum pname, GLint* params);
- void (*GetProgramiv)(
- PP_Resource context, GLuint program, GLenum pname, GLint* params);
- void (*GetProgramInfoLog)(
- PP_Resource context, GLuint program, GLsizei bufsize, GLsizei* length,
- char* infolog);
- void (*GetRenderbufferParameteriv)(
- PP_Resource context, GLenum target, GLenum pname, GLint* params);
- void (*GetShaderiv)(
- PP_Resource context, GLuint shader, GLenum pname, GLint* params);
- void (*GetShaderInfoLog)(
- PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length,
- char* infolog);
- void (*GetShaderPrecisionFormat)(
- PP_Resource context, GLenum shadertype, GLenum precisiontype,
- GLint* range, GLint* precision);
- void (*GetShaderSource)(
- PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length,
- char* source);
+ void (*GetProgramiv)(PP_Resource context,
+ GLuint program,
+ GLenum pname,
+ GLint* params);
+ void (*GetProgramInfoLog)(PP_Resource context,
+ GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog);
+ void (*GetRenderbufferParameteriv)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ GLint* params);
+ void (*GetShaderiv)(PP_Resource context,
+ GLuint shader,
+ GLenum pname,
+ GLint* params);
+ void (*GetShaderInfoLog)(PP_Resource context,
+ GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog);
+ void (*GetShaderPrecisionFormat)(PP_Resource context,
+ GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision);
+ void (*GetShaderSource)(PP_Resource context,
+ GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source);
const GLubyte* (*GetString)(PP_Resource context, GLenum name);
- void (*GetTexParameterfv)(
- PP_Resource context, GLenum target, GLenum pname, GLfloat* params);
- void (*GetTexParameteriv)(
- PP_Resource context, GLenum target, GLenum pname, GLint* params);
- void (*GetUniformfv)(
- PP_Resource context, GLuint program, GLint location, GLfloat* params);
- void (*GetUniformiv)(
- PP_Resource context, GLuint program, GLint location, GLint* params);
- GLint (*GetUniformLocation)(
- PP_Resource context, GLuint program, const char* name);
- void (*GetVertexAttribfv)(
- PP_Resource context, GLuint index, GLenum pname, GLfloat* params);
- void (*GetVertexAttribiv)(
- PP_Resource context, GLuint index, GLenum pname, GLint* params);
- void (*GetVertexAttribPointerv)(
- PP_Resource context, GLuint index, GLenum pname, void** pointer);
+ void (*GetTexParameterfv)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ GLfloat* params);
+ void (*GetTexParameteriv)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ GLint* params);
+ void (*GetUniformfv)(PP_Resource context,
+ GLuint program,
+ GLint location,
+ GLfloat* params);
+ void (*GetUniformiv)(PP_Resource context,
+ GLuint program,
+ GLint location,
+ GLint* params);
+ GLint (*GetUniformLocation)(PP_Resource context,
+ GLuint program,
+ const char* name);
+ void (*GetVertexAttribfv)(PP_Resource context,
+ GLuint index,
+ GLenum pname,
+ GLfloat* params);
+ void (*GetVertexAttribiv)(PP_Resource context,
+ GLuint index,
+ GLenum pname,
+ GLint* params);
+ void (*GetVertexAttribPointerv)(PP_Resource context,
+ GLuint index,
+ GLenum pname,
+ void** pointer);
void (*Hint)(PP_Resource context, GLenum target, GLenum mode);
GLboolean (*IsBuffer)(PP_Resource context, GLuint buffer);
GLboolean (*IsEnabled)(PP_Resource context, GLenum cap);
@@ -195,165 +300,293 @@ struct PPB_OpenGLES2 {
void (*LinkProgram)(PP_Resource context, GLuint program);
void (*PixelStorei)(PP_Resource context, GLenum pname, GLint param);
void (*PolygonOffset)(PP_Resource context, GLfloat factor, GLfloat units);
- void (*ReadPixels)(
- PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height,
- GLenum format, GLenum type, void* pixels);
+ void (*ReadPixels)(PP_Resource context,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels);
void (*ReleaseShaderCompiler)(PP_Resource context);
- void (*RenderbufferStorage)(
- PP_Resource context, GLenum target, GLenum internalformat, GLsizei width,
- GLsizei height);
- void (*SampleCoverage)(
- PP_Resource context, GLclampf value, GLboolean invert);
- void (*Scissor)(
- PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height);
- void (*ShaderBinary)(
- PP_Resource context, GLsizei n, const GLuint* shaders,
- GLenum binaryformat, const void* binary, GLsizei length);
- void (*ShaderSource)(
- PP_Resource context, GLuint shader, GLsizei count, const char** str,
- const GLint* length);
- void (*StencilFunc)(
- PP_Resource context, GLenum func, GLint ref, GLuint mask);
- void (*StencilFuncSeparate)(
- PP_Resource context, GLenum face, GLenum func, GLint ref, GLuint mask);
+ void (*RenderbufferStorage)(PP_Resource context,
+ GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+ void (*SampleCoverage)(PP_Resource context, GLclampf value, GLboolean invert);
+ void (*Scissor)(PP_Resource context,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
+ void (*ShaderBinary)(PP_Resource context,
+ GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length);
+ void (*ShaderSource)(PP_Resource context,
+ GLuint shader,
+ GLsizei count,
+ const char** str,
+ const GLint* length);
+ void (*StencilFunc)(PP_Resource context, GLenum func, GLint ref, GLuint mask);
+ void (*StencilFuncSeparate)(PP_Resource context,
+ GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask);
void (*StencilMask)(PP_Resource context, GLuint mask);
void (*StencilMaskSeparate)(PP_Resource context, GLenum face, GLuint mask);
- void (*StencilOp)(
- PP_Resource context, GLenum fail, GLenum zfail, GLenum zpass);
- void (*StencilOpSeparate)(
- PP_Resource context, GLenum face, GLenum fail, GLenum zfail,
- GLenum zpass);
- void (*TexImage2D)(
- PP_Resource context, GLenum target, GLint level, GLint internalformat,
- GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type,
- const void* pixels);
- void (*TexParameterf)(
- PP_Resource context, GLenum target, GLenum pname, GLfloat param);
- void (*TexParameterfv)(
- PP_Resource context, GLenum target, GLenum pname, const GLfloat* params);
- void (*TexParameteri)(
- PP_Resource context, GLenum target, GLenum pname, GLint param);
- void (*TexParameteriv)(
- PP_Resource context, GLenum target, GLenum pname, const GLint* params);
- void (*TexSubImage2D)(
- PP_Resource context, GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
- const void* pixels);
+ void (*StencilOp)(PP_Resource context,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass);
+ void (*StencilOpSeparate)(PP_Resource context,
+ GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass);
+ void (*TexImage2D)(PP_Resource context,
+ GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels);
+ void (*TexParameterf)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ GLfloat param);
+ void (*TexParameterfv)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ const GLfloat* params);
+ void (*TexParameteri)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ GLint param);
+ void (*TexParameteriv)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ const GLint* params);
+ void (*TexSubImage2D)(PP_Resource context,
+ GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels);
void (*Uniform1f)(PP_Resource context, GLint location, GLfloat x);
- void (*Uniform1fv)(
- PP_Resource context, GLint location, GLsizei count, const GLfloat* v);
+ void (*Uniform1fv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ const GLfloat* v);
void (*Uniform1i)(PP_Resource context, GLint location, GLint x);
- void (*Uniform1iv)(
- PP_Resource context, GLint location, GLsizei count, const GLint* v);
+ void (*Uniform1iv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ const GLint* v);
void (*Uniform2f)(PP_Resource context, GLint location, GLfloat x, GLfloat y);
- void (*Uniform2fv)(
- PP_Resource context, GLint location, GLsizei count, const GLfloat* v);
+ void (*Uniform2fv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ const GLfloat* v);
void (*Uniform2i)(PP_Resource context, GLint location, GLint x, GLint y);
- void (*Uniform2iv)(
- PP_Resource context, GLint location, GLsizei count, const GLint* v);
- void (*Uniform3f)(
- PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z);
- void (*Uniform3fv)(
- PP_Resource context, GLint location, GLsizei count, const GLfloat* v);
- void (*Uniform3i)(
- PP_Resource context, GLint location, GLint x, GLint y, GLint z);
- void (*Uniform3iv)(
- PP_Resource context, GLint location, GLsizei count, const GLint* v);
- void (*Uniform4f)(
- PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z,
- GLfloat w);
- void (*Uniform4fv)(
- PP_Resource context, GLint location, GLsizei count, const GLfloat* v);
- void (*Uniform4i)(
- PP_Resource context, GLint location, GLint x, GLint y, GLint z, GLint w);
- void (*Uniform4iv)(
- PP_Resource context, GLint location, GLsizei count, const GLint* v);
- void (*UniformMatrix2fv)(
- PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
- const GLfloat* value);
- void (*UniformMatrix3fv)(
- PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
- const GLfloat* value);
- void (*UniformMatrix4fv)(
- PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
- const GLfloat* value);
+ void (*Uniform2iv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ const GLint* v);
+ void (*Uniform3f)(PP_Resource context,
+ GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z);
+ void (*Uniform3fv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ const GLfloat* v);
+ void (*Uniform3i)(PP_Resource context,
+ GLint location,
+ GLint x,
+ GLint y,
+ GLint z);
+ void (*Uniform3iv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ const GLint* v);
+ void (*Uniform4f)(PP_Resource context,
+ GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w);
+ void (*Uniform4fv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ const GLfloat* v);
+ void (*Uniform4i)(PP_Resource context,
+ GLint location,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w);
+ void (*Uniform4iv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ const GLint* v);
+ void (*UniformMatrix2fv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+ void (*UniformMatrix3fv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+ void (*UniformMatrix4fv)(PP_Resource context,
+ GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
void (*UseProgram)(PP_Resource context, GLuint program);
void (*ValidateProgram)(PP_Resource context, GLuint program);
void (*VertexAttrib1f)(PP_Resource context, GLuint indx, GLfloat x);
- void (*VertexAttrib1fv)(
- PP_Resource context, GLuint indx, const GLfloat* values);
- void (*VertexAttrib2f)(
- PP_Resource context, GLuint indx, GLfloat x, GLfloat y);
- void (*VertexAttrib2fv)(
- PP_Resource context, GLuint indx, const GLfloat* values);
- void (*VertexAttrib3f)(
- PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z);
- void (*VertexAttrib3fv)(
- PP_Resource context, GLuint indx, const GLfloat* values);
- void (*VertexAttrib4f)(
- PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z,
- GLfloat w);
- void (*VertexAttrib4fv)(
- PP_Resource context, GLuint indx, const GLfloat* values);
- void (*VertexAttribPointer)(
- PP_Resource context, GLuint indx, GLint size, GLenum type,
- GLboolean normalized, GLsizei stride, const void* ptr);
- void (*Viewport)(
- PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height);
+ void (*VertexAttrib1fv)(PP_Resource context,
+ GLuint indx,
+ const GLfloat* values);
+ void (*VertexAttrib2f)(PP_Resource context,
+ GLuint indx,
+ GLfloat x,
+ GLfloat y);
+ void (*VertexAttrib2fv)(PP_Resource context,
+ GLuint indx,
+ const GLfloat* values);
+ void (*VertexAttrib3f)(PP_Resource context,
+ GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z);
+ void (*VertexAttrib3fv)(PP_Resource context,
+ GLuint indx,
+ const GLfloat* values);
+ void (*VertexAttrib4f)(PP_Resource context,
+ GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w);
+ void (*VertexAttrib4fv)(PP_Resource context,
+ GLuint indx,
+ const GLfloat* values);
+ void (*VertexAttribPointer)(PP_Resource context,
+ GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr);
+ void (*Viewport)(PP_Resource context,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
};
-#define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 "PPB_OpenGLES2InstancedArrays;1.0" // NOLINT
-#define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 // NOLINT
+#define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 \
+ "PPB_OpenGLES2InstancedArrays;1.0"
+#define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE \
+ PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0
struct PPB_OpenGLES2InstancedArrays {
- void (*DrawArraysInstancedANGLE)(
- PP_Resource context, GLenum mode, GLint first, GLsizei count,
- GLsizei primcount);
- void (*DrawElementsInstancedANGLE)(
- PP_Resource context, GLenum mode, GLsizei count, GLenum type,
- const void* indices, GLsizei primcount);
- void (*VertexAttribDivisorANGLE)(
- PP_Resource context, GLuint index, GLuint divisor);
+ void (*DrawArraysInstancedANGLE)(PP_Resource context,
+ GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount);
+ void (*DrawElementsInstancedANGLE)(PP_Resource context,
+ GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount);
+ void (*VertexAttribDivisorANGLE)(PP_Resource context,
+ GLuint index,
+ GLuint divisor);
};
-#define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 "PPB_OpenGLES2FramebufferBlit;1.0" // NOLINT
-#define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 // NOLINT
+#define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 \
+ "PPB_OpenGLES2FramebufferBlit;1.0"
+#define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE \
+ PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0
struct PPB_OpenGLES2FramebufferBlit {
- void (*BlitFramebufferEXT)(
- PP_Resource context, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
- GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask,
- GLenum filter);
+ void (*BlitFramebufferEXT)(PP_Resource context,
+ GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter);
};
-#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 "PPB_OpenGLES2FramebufferMultisample;1.0" // NOLINT
-#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 // NOLINT
+#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 \
+ "PPB_OpenGLES2FramebufferMultisample;1.0"
+#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE \
+ PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0
struct PPB_OpenGLES2FramebufferMultisample {
- void (*RenderbufferStorageMultisampleEXT)(
- PP_Resource context, GLenum target, GLsizei samples,
- GLenum internalformat, GLsizei width, GLsizei height);
+ void (*RenderbufferStorageMultisampleEXT)(PP_Resource context,
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
};
-#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 "PPB_OpenGLES2ChromiumEnableFeature;1.0" // NOLINT
-#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 // NOLINT
+#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 \
+ "PPB_OpenGLES2ChromiumEnableFeature;1.0"
+#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE \
+ PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0
struct PPB_OpenGLES2ChromiumEnableFeature {
GLboolean (*EnableFeatureCHROMIUM)(PP_Resource context, const char* feature);
};
-#define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 "PPB_OpenGLES2ChromiumMapSub;1.0" // NOLINT
-#define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 // NOLINT
+#define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 \
+ "PPB_OpenGLES2ChromiumMapSub;1.0"
+#define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE \
+ PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0
struct PPB_OpenGLES2ChromiumMapSub {
- void* (*MapBufferSubDataCHROMIUM)(
- PP_Resource context, GLuint target, GLintptr offset, GLsizeiptr size,
- GLenum access);
+ void* (*MapBufferSubDataCHROMIUM)(PP_Resource context,
+ GLuint target,
+ GLintptr offset,
+ GLsizeiptr size,
+ GLenum access);
void (*UnmapBufferSubDataCHROMIUM)(PP_Resource context, const void* mem);
- void* (*MapTexSubImage2DCHROMIUM)(
- PP_Resource context, GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
- GLenum access);
+ void* (*MapTexSubImage2DCHROMIUM)(PP_Resource context,
+ GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ GLenum access);
void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem);
};
@@ -362,16 +595,20 @@ struct PPB_OpenGLES2ChromiumMapSub {
struct PPB_OpenGLES2Query {
void (*GenQueriesEXT)(PP_Resource context, GLsizei n, GLuint* queries);
- void (*DeleteQueriesEXT)(
- PP_Resource context, GLsizei n, const GLuint* queries);
+ void (*DeleteQueriesEXT)(PP_Resource context,
+ GLsizei n,
+ const GLuint* queries);
GLboolean (*IsQueryEXT)(PP_Resource context, GLuint id);
void (*BeginQueryEXT)(PP_Resource context, GLenum target, GLuint id);
void (*EndQueryEXT)(PP_Resource context, GLenum target);
- void (*GetQueryivEXT)(
- PP_Resource context, GLenum target, GLenum pname, GLint* params);
- void (*GetQueryObjectuivEXT)(
- PP_Resource context, GLuint id, GLenum pname, GLuint* params);
+ void (*GetQueryivEXT)(PP_Resource context,
+ GLenum target,
+ GLenum pname,
+ GLint* params);
+ void (*GetQueryObjectuivEXT)(PP_Resource context,
+ GLuint id,
+ GLenum pname,
+ GLuint* params);
};
#endif // PPAPI_C_PPB_OPENGLES2_H_
-
diff --git a/chromium/ppapi/c/ppb_var.h b/chromium/ppapi/c/ppb_var.h
index 523622dbd77..b4a361a8b28 100644
--- a/chromium/ppapi/c/ppb_var.h
+++ b/chromium/ppapi/c/ppb_var.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_var.idl modified Wed Dec 14 18:08:00 2011. */
+/* From ppb_var.idl modified Thu Apr 10 14:54:41 2014. */
#ifndef PPAPI_C_PPB_VAR_H_
#define PPAPI_C_PPB_VAR_H_
@@ -11,12 +11,14 @@
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_module.h"
+#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
#define PPB_VAR_INTERFACE_1_0 "PPB_Var;1.0"
#define PPB_VAR_INTERFACE_1_1 "PPB_Var;1.1"
-#define PPB_VAR_INTERFACE PPB_VAR_INTERFACE_1_1
+#define PPB_VAR_INTERFACE_1_2 "PPB_Var;1.2"
+#define PPB_VAR_INTERFACE PPB_VAR_INTERFACE_1_2
/**
* @file
@@ -31,7 +33,7 @@
/**
* PPB_Var API
*/
-struct PPB_Var_1_1 {
+struct PPB_Var_1_2 {
/**
* AddRef() adds a reference to the given var. If this is not a refcounted
* object, this function will do nothing so you can always call it no matter
@@ -42,9 +44,13 @@ struct PPB_Var_1_1 {
void (*AddRef)(struct PP_Var var);
/**
* Release() removes a reference to given var, deleting it if the internal
- * reference count becomes 0. If the given var is not a refcounted object,
- * this function will do nothing so you can always call it no matter what
- * the type.
+ * reference count becomes 0. If the <code>PP_Var</code> is of type
+ * <code>PP_VARTYPE_RESOURCE</code>,
+ * it will implicitly release a reference count on the
+ * <code>PP_Resource</code> (equivalent to PPB_Core::ReleaseResource()).
+ *
+ * If the given var is not a refcounted object, this function will do nothing
+ * so you can always call it no matter what the type.
*
* @param[in] var A <code>PP_Var</code> that will have a reference removed.
*/
@@ -57,8 +63,8 @@ struct PPB_Var_1_1 {
*
* If the length is 0, the <code>*data</code> pointer will not be dereferenced
* and may be <code>NULL</code>. Note, however if length is 0, the
- * "NULL-ness" will not be preserved, as <code>VarToUtf8</code> will never
- * return <code>NULL</code> on success, even for empty strings.
+ * "NULL-ness" will not be preserved, as VarToUtf8() will never return
+ * <code>NULL</code> on success, even for empty strings.
*
* The resulting object will be a refcounted string object. It will be
* AddRef'ed for the caller. When the caller is done with it, it should be
@@ -93,9 +99,31 @@ struct PPB_Var_1_1 {
* @return A char* encoded in UTF-8.
*/
const char* (*VarToUtf8)(struct PP_Var var, uint32_t* len);
+ /**
+ * Converts a resource-type var to a <code>PP_Resource</code>.
+ *
+ * @param[in] var A <code>PP_Var</code> struct containing a resource-type var.
+ *
+ * @return A <code>PP_Resource</code> retrieved from the var, or 0 if the var
+ * is not a resource. The reference count of the resource is incremented on
+ * behalf of the caller.
+ */
+ PP_Resource (*VarToResource)(struct PP_Var var);
+ /**
+ * Creates a new <code>PP_Var</code> from a given resource. Implicitly adds a
+ * reference count on the <code>PP_Resource</code> (equivalent to
+ * PPB_Core::AddRefResource(resource)).
+ *
+ * @param[in] resource A <code>PP_Resource</code> to be wrapped in a var.
+ *
+ * @return A <code>PP_Var</code> created for this resource, with type
+ * <code>PP_VARTYPE_RESOURCE</code>. The reference count of the var is set to
+ * 1 on behalf of the caller.
+ */
+ struct PP_Var (*VarFromResource)(PP_Resource resource);
};
-typedef struct PPB_Var_1_1 PPB_Var;
+typedef struct PPB_Var_1_2 PPB_Var;
struct PPB_Var_1_0 {
void (*AddRef)(struct PP_Var var);
@@ -105,6 +133,13 @@ struct PPB_Var_1_0 {
uint32_t len);
const char* (*VarToUtf8)(struct PP_Var var, uint32_t* len);
};
+
+struct PPB_Var_1_1 {
+ void (*AddRef)(struct PP_Var var);
+ void (*Release)(struct PP_Var var);
+ struct PP_Var (*VarFromUtf8)(const char* data, uint32_t len);
+ const char* (*VarToUtf8)(struct PP_Var var, uint32_t* len);
+};
/**
* @}
*/
diff --git a/chromium/ppapi/c/ppb_video_decoder.h b/chromium/ppapi/c/ppb_video_decoder.h
new file mode 100644
index 00000000000..edab7bcafdc
--- /dev/null
+++ b/chromium/ppapi/c/ppb_video_decoder.h
@@ -0,0 +1,222 @@
+/* Copyright (c) 2014 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.
+ */
+
+/* From ppb_video_decoder.idl modified Fri Jul 11 18:06:37 2014. */
+
+#ifndef PPAPI_C_PPB_VIDEO_DECODER_H_
+#define PPAPI_C_PPB_VIDEO_DECODER_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_codecs.h"
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_VIDEODECODER_INTERFACE_0_1 "PPB_VideoDecoder;0.1" /* dev */
+/**
+ * @file
+ * This file defines the <code>PPB_VideoDecoder</code> interface.
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * Video decoder interface.
+ *
+ * Typical usage:
+ * - Call Create() to create a new video decoder resource.
+ * - Call Initialize() to initialize it with a 3d graphics context and the
+ * desired codec profile.
+ * - Call Decode() continuously (waiting for each previous call to complete) to
+ * push bitstream buffers to the decoder.
+ * - Call GetPicture() continuously (waiting for each previous call to complete)
+ * to pull decoded pictures from the decoder.
+ * - Call Flush() to signal end of stream to the decoder and perform shutdown
+ * when it completes.
+ * - Call Reset() to quickly stop the decoder (e.g. to implement Seek) and wait
+ * for the callback before restarting decoding at another point.
+ * - To destroy the decoder, the plugin should release all of its references to
+ * it. Any pending callbacks will abort before the decoder is destroyed.
+ *
+ * Available video codecs vary by platform.
+ * All: theora, vorbis, vp8.
+ * Chrome and ChromeOS: aac, h264.
+ * ChromeOS: mpeg4.
+ */
+struct PPB_VideoDecoder_0_1 { /* dev */
+ /**
+ * Creates a new video decoder resource.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance
+ * with the video decoder.
+ *
+ * @return A <code>PP_Resource</code> corresponding to a video decoder if
+ * successful or 0 otherwise.
+ */
+ PP_Resource (*Create)(PP_Instance instance);
+ /**
+ * Determines if the given resource is a video decoder.
+ *
+ * @param[in] resource A <code>PP_Resource</code> identifying a resource.
+ *
+ * @return <code>PP_TRUE</code> if the resource is a
+ * <code>PPB_VideoDecoder</code>, <code>PP_FALSE</code> if the resource is
+ * invalid or some other type.
+ */
+ PP_Bool (*IsVideoDecoder)(PP_Resource resource);
+ /**
+ * Initializes a video decoder resource. This should be called after Create()
+ * and before any other functions.
+ *
+ * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
+ * decoder.
+ * @param[in] graphics3d_context A <code>PPB_Graphics3D</code> resource to use
+ * during decoding.
+ * @param[in] profile A <code>PP_VideoProfile</code> specifying the video
+ * codec profile.
+ * @param[in] allow_software_fallback A <code>PP_Bool</code> specifying
+ * whether the decoder can fall back to software decoding if a suitable
+ * hardware decoder isn't available.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion.
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * Returns PP_ERROR_NOTSUPPORTED if video decoding is not available, or the
+ * requested profile is not supported. In this case, the client may call
+ * Initialize() again with different parameters to find a good configuration.
+ */
+ int32_t (*Initialize)(PP_Resource video_decoder,
+ PP_Resource graphics3d_context,
+ PP_VideoProfile profile,
+ PP_Bool allow_software_fallback,
+ struct PP_CompletionCallback callback);
+ /**
+ * Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's
+ * |buffer|. The plugin should wait until the decoder signals completion by
+ * returning PP_OK or by running |callback| before calling Decode() again.
+ *
+ * In general, each bitstream buffer should contain a demuxed bitstream frame
+ * for the selected video codec. For example, H264 decoders expect to receive
+ * one AnnexB NAL unit, including the 4 byte start code prefix, while VP8
+ * decoders expect to receive a bitstream frame without the IVF frame header.
+ *
+ * If the call to Decode() eventually results in a picture, the |decode_id|
+ * parameter is copied into the returned picture. The plugin can use this to
+ * associate decoded pictures with Decode() calls (e.g. to assign timestamps
+ * or frame numbers to pictures.) This value is opaque to the API so the
+ * plugin is free to pass any value.
+ *
+ * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
+ * decoder.
+ * @param[in] decode_id An optional value, chosen by the plugin, that can be
+ * used to associate calls to Decode() with decoded pictures returned by
+ * GetPicture().
+ * @param[in] size Buffer size in bytes.
+ * @param[in] buffer Starting address of buffer.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
+ * completion.
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * Returns PP_ERROR_FAILED if the decoder isn't initialized or if a Flush()
+ * or Reset() call is pending.
+ * Returns PP_ERROR_INPROGRESS if there is another Decode() call pending.
+ * Returns PP_ERROR_NOMEMORY if a bitstream buffer can't be created.
+ * Returns PP_ERROR_ABORTED when Reset() is called while Decode() is pending.
+ */
+ int32_t (*Decode)(PP_Resource video_decoder,
+ uint32_t decode_id,
+ uint32_t size,
+ const void* buffer,
+ struct PP_CompletionCallback callback);
+ /**
+ * Gets the next picture from the decoder. The picture is valid after the
+ * decoder signals completion by returning PP_OK or running |callback|. The
+ * plugin can call GetPicture() again after the decoder signals completion.
+ * When the plugin is finished using the picture, it should return it to the
+ * system by calling RecyclePicture().
+ *
+ * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
+ * decoder.
+ * @param[out] picture A <code>PP_VideoPicture</code> to hold the decoded
+ * picture.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
+ * completion.
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * Returns PP_ERROR_FAILED if the decoder isn't initialized or if a Reset()
+ * call is pending.
+ * Returns PP_ERROR_INPROGRESS if there is another GetPicture() call pending.
+ * Returns PP_ERROR_ABORTED when Reset() is called, or if a call to Flush()
+ * completes while GetPicture() is pending.
+ */
+ int32_t (*GetPicture)(PP_Resource video_decoder,
+ struct PP_VideoPicture* picture,
+ struct PP_CompletionCallback callback);
+ /**
+ * Recycles a picture that the plugin has received from the decoder.
+ * The plugin should call this as soon as it has finished using the texture so
+ * the decoder can decode more pictures.
+ *
+ * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
+ * decoder.
+ * @param[in] picture A <code>PP_VideoPicture</code> to return to
+ * the decoder.
+ */
+ void (*RecyclePicture)(PP_Resource video_decoder,
+ const struct PP_VideoPicture* picture);
+ /**
+ * Flushes the decoder. The plugin should call Flush() when it reaches the
+ * end of its video stream in order to stop cleanly. The decoder will run any
+ * pending Decode() call to completion. The plugin should make no further
+ * calls to the decoder other than GetPicture() and RecyclePicture() until
+ * the decoder signals completion by running |callback|. Just before
+ * completion, any pending GetPicture() call will complete by running its
+ * callback with result PP_ERROR_ABORTED to signal that no more pictures are
+ * available. Any pictures held by the plugin remain valid during and after
+ * the flush and should be recycled back to the decoder.
+ *
+ * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
+ * decoder.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
+ * completion.
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * Returns PP_ERROR_FAILED if the decoder isn't initialized.
+ */
+ int32_t (*Flush)(PP_Resource video_decoder,
+ struct PP_CompletionCallback callback);
+ /**
+ * Resets the decoder as quickly as possible. The plugin can call Reset() to
+ * skip to another position in the video stream. After Reset() returns, any
+ * pending calls to Decode() and GetPicture()) abort, causing their callbacks
+ * to run with PP_ERROR_ABORTED. The plugin should not make further calls to
+ * the decoder other than RecyclePicture() until the decoder signals
+ * completion by running |callback|. Any pictures held by the plugin remain
+ * valid during and after the reset and should be recycled back to the
+ * decoder.
+ *
+ * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
+ * decoder.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
+ * completion.
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * Returns PP_ERROR_FAILED if the decoder isn't initialized.
+ */
+ int32_t (*Reset)(PP_Resource video_decoder,
+ struct PP_CompletionCallback callback);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */
+
diff --git a/chromium/ppapi/c/ppb_video_frame.h b/chromium/ppapi/c/ppb_video_frame.h
new file mode 100644
index 00000000000..3efe3924927
--- /dev/null
+++ b/chromium/ppapi/c/ppb_video_frame.h
@@ -0,0 +1,139 @@
+/* Copyright 2014 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.
+ */
+
+/* From ppb_video_frame.idl modified Tue Mar 25 18:28:57 2014. */
+
+#ifndef PPAPI_C_PPB_VIDEO_FRAME_H_
+#define PPAPI_C_PPB_VIDEO_FRAME_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/pp_time.h"
+
+#define PPB_VIDEOFRAME_INTERFACE_0_1 "PPB_VideoFrame;0.1"
+#define PPB_VIDEOFRAME_INTERFACE PPB_VIDEOFRAME_INTERFACE_0_1
+
+/**
+ * @file
+ * Defines the <code>PPB_VideoFrame</code> interface.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+typedef enum {
+ /**
+ * Unknown format value.
+ */
+ PP_VIDEOFRAME_FORMAT_UNKNOWN = 0,
+ /**
+ * 12bpp YVU planar 1x1 Y, 2x2 VU samples.
+ */
+ PP_VIDEOFRAME_FORMAT_YV12 = 1,
+ /**
+ * 12bpp YUV planar 1x1 Y, 2x2 UV samples.
+ */
+ PP_VIDEOFRAME_FORMAT_I420 = 2,
+ /**
+ * 32bpp BGRA.
+ */
+ PP_VIDEOFRAME_FORMAT_BGRA = 3,
+ /**
+ * The last format.
+ */
+ PP_VIDEOFRAME_FORMAT_LAST = PP_VIDEOFRAME_FORMAT_BGRA
+} PP_VideoFrame_Format;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+struct PPB_VideoFrame_0_1 {
+ /**
+ * Determines if a resource is a VideoFrame resource.
+ *
+ * @param[in] resource The <code>PP_Resource</code> to test.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise.
+ */
+ PP_Bool (*IsVideoFrame)(PP_Resource resource);
+ /**
+ * Gets the timestamp of the video frame.
+ *
+ * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
+ * resource.
+ *
+ * @return A <code>PP_TimeDelta</code> containing the timestamp of the video
+ * frame. Given in seconds since the start of the containing video stream.
+ */
+ PP_TimeDelta (*GetTimestamp)(PP_Resource frame);
+ /**
+ * Sets the timestamp of the video frame. Given in seconds since the
+ * start of the containing video stream.
+ *
+ * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
+ * resource.
+ * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
+ * of the video frame. Given in seconds since the start of the containing
+ * video stream.
+ */
+ void (*SetTimestamp)(PP_Resource frame, PP_TimeDelta timestamp);
+ /**
+ * Gets the format of the video frame.
+ *
+ * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
+ * resource.
+ *
+ * @return A <code>PP_VideoFrame_Format</code> containing the format of the
+ * video frame.
+ */
+ PP_VideoFrame_Format (*GetFormat)(PP_Resource frame);
+ /**
+ * Gets the size of the video frame.
+ *
+ * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
+ * resource.
+ * @param[out] size A <code>PP_Size</code>.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> on success or
+ * <code>PP_FALSE</code> on failure.
+ */
+ PP_Bool (*GetSize)(PP_Resource frame, struct PP_Size* size);
+ /**
+ * Gets the data buffer for video frame pixels.
+ *
+ * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
+ * resource.
+ *
+ * @return A pointer to the beginning of the data buffer.
+ */
+ void* (*GetDataBuffer)(PP_Resource frame);
+ /**
+ * Gets the size of data buffer.
+ *
+ * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
+ * resource.
+ *
+ * @return The size of the data buffer.
+ */
+ uint32_t (*GetDataBufferSize)(PP_Resource frame);
+};
+
+typedef struct PPB_VideoFrame_0_1 PPB_VideoFrame;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_VIDEO_FRAME_H_ */
+
diff --git a/chromium/ppapi/c/ppb_view.h b/chromium/ppapi/c/ppb_view.h
index 8b82c78a3b8..ee3c73683a3 100644
--- a/chromium/ppapi/c/ppb_view.h
+++ b/chromium/ppapi/c/ppb_view.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_view.idl modified Fri Mar 29 11:55:32 2013. */
+/* From ppb_view.idl modified Tue Jun 17 10:27:32 2014. */
#ifndef PPAPI_C_PPB_VIEW_H_
#define PPAPI_C_PPB_VIEW_H_
@@ -18,6 +18,7 @@
#define PPB_VIEW_INTERFACE_1_0 "PPB_View;1.0"
#define PPB_VIEW_INTERFACE_1_1 "PPB_View;1.1"
+#define PPB_VIEW_INTERFACE_1_2 "PPB_View;1.2" /* dev */
#define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_1
/**
@@ -36,7 +37,7 @@
* You will receive new view information using
* <code>PPP_Instance.DidChangeView</code>.
*/
-struct PPB_View_1_1 {
+struct PPB_View_1_2 { /* dev */
/**
* IsView() determines if the given resource is a valid
* <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code>
@@ -197,10 +198,22 @@ struct PPB_View_1_1 {
* DIPs per CSS pixel. If the resource is invalid, the value will be 0.0.
*/
float (*GetCSSScale)(PP_Resource resource);
+ /**
+ * GetScrollOffset returns the scroll offset of the window containing the
+ * plugin.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * <code>PPB_View</code> resource.
+ *
+ * @param[out] offset A <code>PP_Point</code> which will be set to the value
+ * of the scroll offset in CSS pixels.
+ *
+ * @return Returns <code>PP_TRUE</code> if the resource was valid and the
+ * offset was filled in, <code>PP_FALSE</code> if not.
+ */
+ PP_Bool (*GetScrollOffset)(PP_Resource resource, struct PP_Point* offset);
};
-typedef struct PPB_View_1_1 PPB_View;
-
struct PPB_View_1_0 {
PP_Bool (*IsView)(PP_Resource resource);
PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect);
@@ -209,6 +222,19 @@ struct PPB_View_1_0 {
PP_Bool (*IsPageVisible)(PP_Resource resource);
PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip);
};
+
+struct PPB_View_1_1 {
+ PP_Bool (*IsView)(PP_Resource resource);
+ PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect);
+ PP_Bool (*IsFullscreen)(PP_Resource resource);
+ PP_Bool (*IsVisible)(PP_Resource resource);
+ PP_Bool (*IsPageVisible)(PP_Resource resource);
+ PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip);
+ float (*GetDeviceScale)(PP_Resource resource);
+ float (*GetCSSScale)(PP_Resource resource);
+};
+
+typedef struct PPB_View_1_1 PPB_View;
/**
* @}
*/
diff --git a/chromium/ppapi/c/ppp_input_event.h b/chromium/ppapi/c/ppp_input_event.h
index 76c32b28719..4f3e017d935 100644
--- a/chromium/ppapi/c/ppp_input_event.h
+++ b/chromium/ppapi/c/ppp_input_event.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppp_input_event.idl modified Mon Dec 19 19:44:12 2011. */
+/* From ppp_input_event.idl modified Tue Apr 8 15:19:45 2014. */
#ifndef PPAPI_C_PPP_INPUT_EVENT_H_
#define PPAPI_C_PPP_INPUT_EVENT_H_
@@ -35,10 +35,10 @@ struct PPP_InputEvent_0_1 {
* PPB_InputEvent.RequestInputEvents() or RequestFilteringInputEvents(). By
* default, no events are delivered.
*
- * If the event was handled, it will not be forwarded to the web page or
- * browser. If it was not handled, it will bubble according to the normal
- * rules. So it is important that an instance respond accurately with whether
- * event propagation should continue.
+ * If the event was handled, it will not be forwarded to the default handlers
+ * in the web page. If it was not handled, it may be dispatched to a default
+ * handler. So it is important that an instance respond accurately with
+ * whether event propagation should continue.
*
* Event propagation also controls focus. If you handle an event like a mouse
* event, typically the instance will be given focus. Returning false from
diff --git a/chromium/ppapi/c/ppp_message_handler.h b/chromium/ppapi/c/ppp_message_handler.h
new file mode 100644
index 00000000000..8032378a92b
--- /dev/null
+++ b/chromium/ppapi/c/ppp_message_handler.h
@@ -0,0 +1,87 @@
+/* Copyright 2014 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.
+ */
+
+/* From ppp_message_handler.idl modified Tue Jun 3 16:50:26 2014. */
+
+#ifndef PPAPI_C_PPP_MESSAGE_HANDLER_H_
+#define PPAPI_C_PPP_MESSAGE_HANDLER_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/pp_var.h"
+
+/**
+ * @file
+ * This file defines the <code>PPP_MessageHandler</code> interface that plugins
+ * can implement and register using PPB_Messaging::RegisterMessageHandler in
+ * order to handle messages sent from JavaScript via postMessage() or
+ * postMessageAndAwaitResponse().
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * The <code>PPP_MessageHandler</code> interface is implemented by the plugin
+ * if the plugin wants to receive messages from a thread other than the main
+ * Pepper thread, or if the plugin wants to handle blocking messages which
+ * JavaScript may send via postMessageAndAwaitResponse().
+ *
+ * This interface struct should not be returned by PPP_GetInterface; instead it
+ * must be passed as a parameter to PPB_Messaging::RegisterMessageHandler.
+ */
+struct PPP_MessageHandler_0_1 {
+ /**
+ * Invoked as a result of JavaScript invoking postMessage() on the plugin's
+ * DOM element.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance
+ * of a module.
+ * @param[in] user_data is the same pointer which was provided by a call to
+ * RegisterMessageHandler.
+ * @param[in] message A copy of the parameter that JavaScript provided to
+ * postMessage().
+ */
+ void (*HandleMessage)(PP_Instance instance,
+ void* user_data,
+ struct PP_Var message);
+ /**
+ * Invoked as a result of JavaScript invoking postMessageAndAwaitResponse()
+ * on the plugin's DOM element.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance
+ * of a module.
+ * @param[in] user_data is the same pointer which was provided by a call to
+ * RegisterMessageHandler.
+ * @param[in] message is a copy of the parameter that JavaScript provided
+ * to postMessageAndAwaitResponse.
+ * @return will be copied to a JavaScript object which is returned as
+ * the result of postMessageAndAwaitResponse to the invoking JavaScript.
+ */
+ struct PP_Var (*HandleBlockingMessage)(PP_Instance instance,
+ void* user_data,
+ struct PP_Var message);
+ /**
+ * Invoked when the handler object is no longer needed. After this, no more
+ * calls will be made which pass this same value for <code>instance</code>
+ * and <code>user_data</code>.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance
+ * of a module.
+ * @param[in] user_data is the same pointer which was provided by a call to
+ * RegisterMessageHandler.
+ */
+ void (*Destroy)(PP_Instance instance, void* user_data);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPP_MESSAGE_HANDLER_H_ */
+
diff --git a/chromium/ppapi/c/private/pp_content_decryptor.h b/chromium/ppapi/c/private/pp_content_decryptor.h
index a282abbf3a5..971d2a0b619 100644
--- a/chromium/ppapi/c/private/pp_content_decryptor.h
+++ b/chromium/ppapi/c/private/pp_content_decryptor.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From private/pp_content_decryptor.idl modified Mon Oct 21 18:38:44 2013. */
+/* From private/pp_content_decryptor.idl modified Thu Jun 5 13:39:15 2014. */
#ifndef PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_
#define PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_
@@ -103,10 +103,6 @@ struct PP_EncryptedBlockInfo {
*/
uint32_t data_size;
/**
- * Size in bytes of data to be discarded before applying the decryption.
- */
- uint32_t data_offset;
- /**
* Key ID of the block to be decrypted.
*
* TODO(xhwang): For WebM the key ID can be as large as 2048 bytes in theory.
@@ -127,13 +123,8 @@ struct PP_EncryptedBlockInfo {
*/
struct PP_DecryptSubsampleDescription subsamples[16];
uint32_t num_subsamples;
- /**
- * 4-byte padding to make the size of <code>PP_EncryptedBlockInfo</code>
- * a multiple of 8 bytes. The value of this field should not be used.
- */
- uint32_t padding;
};
-PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedBlockInfo, 248);
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedBlockInfo, 240);
/**
* @}
*/
@@ -375,7 +366,8 @@ PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_AudioDecoderConfig, 20);
typedef enum {
PP_VIDEOCODEC_UNKNOWN = 0,
PP_VIDEOCODEC_VP8 = 1,
- PP_VIDEOCODEC_H264 = 2
+ PP_VIDEOCODEC_H264 = 2,
+ PP_VIDEOCODEC_VP9 = 3
} PP_VideoCodec;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoCodec, 4);
@@ -386,7 +378,7 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoCodec, 4);
*/
typedef enum {
PP_VIDEOCODECPROFILE_UNKNOWN = 0,
- PP_VIDEOCODECPROFILE_VP8_MAIN = 1,
+ PP_VIDEOCODECPROFILE_NOT_NEEDED = 1,
PP_VIDEOCODECPROFILE_H264_BASELINE = 2,
PP_VIDEOCODECPROFILE_H264_MAIN = 3,
PP_VIDEOCODECPROFILE_H264_EXTENDED = 4,
@@ -457,6 +449,29 @@ typedef enum {
PP_DECRYPTORSTREAMTYPE_VIDEO = 1
} PP_DecryptorStreamType;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4);
+
+/**
+ * <code>PP_SessionType</code> contains session type constants.
+ */
+typedef enum {
+ PP_SESSIONTYPE_TEMPORARY = 0,
+ PP_SESSIONTYPE_PERSISTENT = 1
+} PP_SessionType;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_SessionType, 4);
+
+/**
+ * <code>PP_CdmExceptionCode</code> contains exception code constants.
+ */
+typedef enum {
+ PP_CDMEXCEPTIONCODE_NOTSUPPORTEDERROR = 1,
+ PP_CDMEXCEPTIONCODE_INVALIDSTATEERROR = 2,
+ PP_CDMEXCEPTIONCODE_INVALIDACCESSERROR = 3,
+ PP_CDMEXCEPTIONCODE_QUOTAEXCEEDEDERROR = 4,
+ PP_CDMEXCEPTIONCODE_UNKNOWNERROR = 5,
+ PP_CDMEXCEPTIONCODE_CLIENTERROR = 6,
+ PP_CDMEXCEPTIONCODE_OUTPUTERROR = 7
+} PP_CdmExceptionCode;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CdmExceptionCode, 4);
/**
* @}
*/
diff --git a/chromium/ppapi/c/private/ppb_content_decryptor_private.h b/chromium/ppapi/c/private/ppb_content_decryptor_private.h
index 58492a00a4c..c65c9f8a943 100644
--- a/chromium/ppapi/c/private/ppb_content_decryptor_private.h
+++ b/chromium/ppapi/c/private/ppb_content_decryptor_private.h
@@ -4,7 +4,7 @@
*/
/* From private/ppb_content_decryptor_private.idl,
- * modified Fri Dec 6 12:16:22 2013.
+ * modified Thu Jun 5 13:39:15 2014.
*/
#ifndef PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_
@@ -18,10 +18,10 @@
#include "ppapi/c/pp_var.h"
#include "ppapi/c/private/pp_content_decryptor.h"
-#define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_9 \
- "PPB_ContentDecryptor_Private;0.9"
+#define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_12 \
+ "PPB_ContentDecryptor_Private;0.12"
#define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE \
- PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_9
+ PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_12
/**
* @file
@@ -42,21 +42,42 @@
* browser side support for the Content Decryption Module (CDM) for Encrypted
* Media Extensions: http://www.w3.org/TR/encrypted-media/
*/
-struct PPB_ContentDecryptor_Private_0_9 {
+struct PPB_ContentDecryptor_Private_0_12 {
/**
- * A session has been created by the CDM.
+ * A promise has been resolved by the CDM.
*
- * @param[in] session_id Identifies the session for which the CDM
- * created a session.
+ * @param[in] promise_id Identifies the promise that the CDM resolved.
+ */
+ void (*PromiseResolved)(PP_Instance instance, uint32_t promise_id);
+ /**
+ * A promise has been resolved by the CDM.
+ *
+ * @param[in] promise_id Identifies the promise that the CDM resolved.
*
* @param[in] web_session_id A <code>PP_Var</code> of type
- * <code>PP_VARTYPE_STRING</code> containing the string for the
- * MediaKeySession's sessionId attribute.
+ * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute.
+ */
+ void (*PromiseResolvedWithSession)(PP_Instance instance,
+ uint32_t promise_id,
+ struct PP_Var web_session_id);
+ /**
+ * A promise has been rejected by the CDM due to an error.
+ *
+ * @param[in] promise_id Identifies the promise that the CDM rejected.
+ *
+ * @param[in] exception_code A <code>PP_CdmExceptionCode</code> containing
+ * the exception code.
*
+ * @param[in] system_code A system error code.
+ *
+ * @param[in] error_description A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the error description.
*/
- void (*SessionCreated)(PP_Instance instance,
- uint32_t session_id,
- struct PP_Var web_session_id);
+ void (*PromiseRejected)(PP_Instance instance,
+ uint32_t promise_id,
+ PP_CdmExceptionCode exception_code,
+ uint32_t system_code,
+ struct PP_Var error_description);
/**
* A message or request has been generated for key_system in the CDM, and
* must be sent to the web application.
@@ -71,8 +92,9 @@ struct PPB_ContentDecryptor_Private_0_9 {
* of <code>UpdateSession()</code> and <code>SessionMessage()</code> calls
* required to prepare for decryption.
*
- * @param[in] session_id Identifies the session for which the message
- * is intended.
+ * @param[in] web_session_id A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute for
+ * which the message is intended.
*
* @param[in] message A <code>PP_Var</code> of type
* <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the message.
@@ -82,7 +104,7 @@ struct PPB_ContentDecryptor_Private_0_9 {
* message.
*/
void (*SessionMessage)(PP_Instance instance,
- uint32_t session_id,
+ struct PP_Var web_session_id,
struct PP_Var message,
struct PP_Var destination_url);
/**
@@ -97,33 +119,43 @@ struct PPB_ContentDecryptor_Private_0_9 {
* The CDM must call <code>SessionReady()</code> when the sequence is
* completed, and, in response, the browser must notify the web application.
*
- * @param[in] session_id Identifies the session that is ready.
+ * @param[in] web_session_id A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of
+ * the session that is now ready.
*/
- void (*SessionReady)(PP_Instance instance, uint32_t session_id);
+ void (*SessionReady)(PP_Instance instance, struct PP_Var web_session_id);
/**
* The session has been closed as the result of a call to the
* <code>ReleaseSession()</code> method on the
* <code>PPP_ContentDecryptor_Private</code> interface, or due to other
* factors as determined by the CDM.
*
- * @param[in] session_id Identifies the session that is closed.
+ * @param[in] web_session_id A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of
+ * the session that is now closed.
*/
- void (*SessionClosed)(PP_Instance instance, uint32_t session_id);
+ void (*SessionClosed)(PP_Instance instance, struct PP_Var web_session_id);
/**
* An error occurred in a <code>PPP_ContentDecryptor_Private</code> method,
* or within the plugin implementing the interface.
*
- * @param[in] session_id Identifies the session for which the error
- * is intended.
+ * @param[in] web_session_id A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of
+ * the session that caused the error.
+ *
+ * @param[in] exception_code A <code>PP_CdmExceptionCode</code> containing
+ * the exception code.
*
- * @param[in] media_error A MediaKeyError.
+ * @param[in] system_code A system error code.
*
- * @param[in] system_error A system error code.
+ * @param[in] error_description A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the error description.
*/
void (*SessionError)(PP_Instance instance,
- uint32_t session_id,
- int32_t media_error,
- int32_t system_code);
+ struct PP_Var web_session_id,
+ PP_CdmExceptionCode exception_code,
+ uint32_t system_code,
+ struct PP_Var error_description);
/**
* Called after the <code>Decrypt()</code> method on the
* <code>PPP_ContentDecryptor_Private</code> interface completes to
@@ -253,7 +285,7 @@ struct PPB_ContentDecryptor_Private_0_9 {
const struct PP_DecryptedSampleInfo* decrypted_sample_info);
};
-typedef struct PPB_ContentDecryptor_Private_0_9 PPB_ContentDecryptor_Private;
+typedef struct PPB_ContentDecryptor_Private_0_12 PPB_ContentDecryptor_Private;
/**
* @}
*/
diff --git a/chromium/ppapi/c/private/ppb_display_color_profile_private.h b/chromium/ppapi/c/private/ppb_display_color_profile_private.h
new file mode 100644
index 00000000000..d215a75f801
--- /dev/null
+++ b/chromium/ppapi/c/private/ppb_display_color_profile_private.h
@@ -0,0 +1,123 @@
+/* Copyright 2014 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.
+ */
+
+/* From private/ppb_display_color_profile_private.idl,
+ * modified Mon Dec 16 20:53:23 2013.
+ */
+
+#ifndef PPAPI_C_PRIVATE_PPB_DISPLAY_COLOR_PROFILE_PRIVATE_H_
+#define PPAPI_C_PRIVATE_PPB_DISPLAY_COLOR_PROFILE_PRIVATE_H_
+
+#include "ppapi/c/pp_array_output.h"
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_DISPLAYCOLORPROFILE_PRIVATE_INTERFACE_0_1 \
+ "PPB_DisplayColorProfile_Private;0.1"
+#define PPB_DISPLAYCOLORPROFILE_PRIVATE_INTERFACE \
+ PPB_DISPLAYCOLORPROFILE_PRIVATE_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the <code>PPB_DisplayColorProfile</code> struct used for
+ * getting the color profile of the display.
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * <code>PPB_DisplayColorProfile_Private</code> defines the methods for getting
+ * the display color profile and monitoring its changes.
+ *
+ * <strong>Setup:<strong>
+ * @code
+ * PP_ArrayOutput output = { MyAllocatorFunction, color_profile_data };
+ * PP_Resource display_cp = display_cp_interface->Create(instance);
+ * display_cp_interface->GetColorProfile(display_cp,
+ * output,
+ * completion_callback);
+ * @endcode
+ */
+struct PPB_DisplayColorProfile_Private_0_1 {
+ /**
+ * Create() creates a display color profile resource.
+ *
+ * @param[in] instance The module instance.
+ * @return A <code>PP_Resource</code> containing a display color profile
+ * resource.
+ */
+ PP_Resource (*Create)(PP_Instance instance);
+ /**
+ * IsDisplayColorProfile() determines if the given resource is a valid
+ * <code>DisplayColorProfile</code> resource.
+ *
+ * @param[in] resource A <code>DisplayColorProfile</code> context resource.
+ * @return Returns:
+ * - <code>PP_TRUE</code> if the given resource is a valid
+ * <code>DisplayColorProfile</code>
+ * - <code>PP_FALSE</code> if it is an invalid resource or is a resource
+ * of another type.
+ */
+ PP_Bool (*IsDisplayColorProfile)(PP_Resource resource);
+ /**
+ * GetColorProfile() enqueues a request for the current display color profile.
+ *
+ * This method is intended for getting the color profile data of the display
+ * on which the browser window resides. [However currently Chrome only
+ * considers the system's primary display color profile when doing its color
+ * management. For consistency this method will also return the color profile
+ * that Chrome uses for its browser window.]
+ *
+ * @param[in] display_color_profile_res The display color profile resource.
+ * @param[in] color_profile A <code>PP_OutputArray</code> which on success
+ * will receive a byte array containing the ICC color profile data (see
+ * www.color.org for a reference to the ICC color profile specification
+ * and versions). The returned color profile version is the one supported by
+ * the host system.
+ * @param[in] callback The completion callback to be called once the display
+ * color profile data is available.
+ *
+ * @return Returns an error code from <code>pp_errors.h</code>.
+ */
+ int32_t (*GetColorProfile)(PP_Resource display_color_profile_res,
+ struct PP_ArrayOutput color_profile,
+ struct PP_CompletionCallback callback);
+ /**
+ * RegisterColorProfileChangeCallback() registers a callback to be called next
+ * time the color profile for the browser window in which the plugin resides
+ * changes. In order to get notifications for all color profile changes a call
+ * to RegisterColorProfileChangeCallback() function should be done when the
+ * previous notification was fired.
+ *
+ * There might be 2 scenarios in which the color profile for a window changes:
+ * a) The window is moved from one display to another;
+ * b) The user changes the display color space from the system settings.
+ *
+ * @param[in] display_color_profile_res The display color profile resource.
+ * @param[in] callback The callback to be invoked next time the display
+ * color profile changes.
+ *
+ * @return Returns an error code from <code>pp_errors.h</code>.
+ */
+ int32_t (*RegisterColorProfileChangeCallback)(
+ PP_Resource display_color_profile_res,
+ struct PP_CompletionCallback callback);
+};
+
+typedef struct PPB_DisplayColorProfile_Private_0_1
+ PPB_DisplayColorProfile_Private;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PRIVATE_PPB_DISPLAY_COLOR_PROFILE_PRIVATE_H_ */
+
diff --git a/chromium/ppapi/c/private/ppb_find_private.h b/chromium/ppapi/c/private/ppb_find_private.h
new file mode 100644
index 00000000000..09ebab00137
--- /dev/null
+++ b/chromium/ppapi/c/private/ppb_find_private.h
@@ -0,0 +1,81 @@
+/* Copyright 2014 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.
+ */
+
+/* From private/ppb_find_private.idl modified Wed Mar 19 13:42:13 2014. */
+
+#ifndef PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_
+#define PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_point.h"
+#include "ppapi/c/pp_rect.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_FIND_PRIVATE_INTERFACE_0_3 "PPB_Find_Private;0.3"
+#define PPB_FIND_PRIVATE_INTERFACE PPB_FIND_PRIVATE_INTERFACE_0_3
+
+/**
+ * @file
+ * This file defines the <code>PPB_Find_Private</code> interface.
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * This is a private interface for doing browser Find in the PDF plugin.
+ */
+struct PPB_Find_Private_0_3 {
+ /**
+ * Sets the instance of this plugin as the mechanism that will be used to
+ * handle find requests in the renderer. This will only succeed if the plugin
+ * is embedded within the content of the top level frame. Note that this will
+ * result in the renderer handing over all responsibility for doing find to
+ * the plugin and content from the rest of the page will not be searched.
+ *
+ *
+ * In the case that the plugin is loaded directly as the top level document,
+ * this function does not need to be called. In that case the plugin is
+ * assumed to handle find requests.
+ *
+ * There can only be one plugin which handles find requests. If a plugin calls
+ * this while an existing plugin is registered, the existing plugin will be
+ * de-registered and will no longer receive any requests.
+ */
+ void (*SetPluginToHandleFindRequests)(PP_Instance instance);
+ /**
+ * Updates the number of find results for the current search term. If
+ * there are no matches 0 should be passed in. Only when the plugin has
+ * finished searching should it pass in the final count with final_result set
+ * to PP_TRUE.
+ */
+ void (*NumberOfFindResultsChanged)(PP_Instance instance,
+ int32_t total,
+ PP_Bool final_result);
+ /**
+ * Updates the index of the currently selected search item.
+ */
+ void (*SelectedFindResultChanged)(PP_Instance instance, int32_t index);
+ /**
+ * Updates the tickmarks on the scrollbar for the find request. |tickmarks|
+ * contains |count| PP_Rects indicating the tickmark ranges.
+ */
+ void (*SetTickmarks)(PP_Instance instance,
+ const struct PP_Rect tickmarks[],
+ uint32_t count);
+};
+
+typedef struct PPB_Find_Private_0_3 PPB_Find_Private;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_ */
+
diff --git a/chromium/ppapi/c/private/ppb_flash_clipboard.h b/chromium/ppapi/c/private/ppb_flash_clipboard.h
index d59957a828e..1ff8614c58b 100644
--- a/chromium/ppapi/c/private/ppb_flash_clipboard.h
+++ b/chromium/ppapi/c/private/ppb_flash_clipboard.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From private/ppb_flash_clipboard.idl modified Thu Mar 28 10:23:59 2013. */
+/* From private/ppb_flash_clipboard.idl modified Thu Jan 23 10:16:39 2014. */
#ifndef PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
#define PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
@@ -16,7 +16,8 @@
#define PPB_FLASH_CLIPBOARD_INTERFACE_4_0 "PPB_Flash_Clipboard;4.0"
#define PPB_FLASH_CLIPBOARD_INTERFACE_5_0 "PPB_Flash_Clipboard;5.0"
-#define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_5_0
+#define PPB_FLASH_CLIPBOARD_INTERFACE_5_1 "PPB_Flash_Clipboard;5.1"
+#define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_5_1
/**
* @file
@@ -77,7 +78,7 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Flash_Clipboard_Format, 4);
* used by Pepper Flash to access the clipboard.
*
*/
-struct PPB_Flash_Clipboard_5_0 {
+struct PPB_Flash_Clipboard_5_1 {
/**
* Registers a custom clipboard format. The format is identified by a
* string. An id identifying the format will be returned if the format is
@@ -129,9 +130,18 @@ struct PPB_Flash_Clipboard_5_0 {
uint32_t data_item_count,
const uint32_t formats[],
const struct PP_Var data_items[]);
+ /**
+ * Gets a sequence number which uniquely identifies clipboard state. This can
+ * be used to version the data on the clipboard and determine whether it has
+ * changed. The sequence number will be placed in |sequence_number| and
+ * PP_TRUE returned if the sequence number was retrieved successfully.
+ */
+ PP_Bool (*GetSequenceNumber)(PP_Instance instance_id,
+ PP_Flash_Clipboard_Type clipboard_type,
+ uint64_t* sequence_number);
};
-typedef struct PPB_Flash_Clipboard_5_0 PPB_Flash_Clipboard;
+typedef struct PPB_Flash_Clipboard_5_1 PPB_Flash_Clipboard;
struct PPB_Flash_Clipboard_4_0 {
PP_Bool (*IsFormatAvailable)(PP_Instance instance_id,
@@ -146,6 +156,22 @@ struct PPB_Flash_Clipboard_4_0 {
const PP_Flash_Clipboard_Format formats[],
const struct PP_Var data_items[]);
};
+
+struct PPB_Flash_Clipboard_5_0 {
+ uint32_t (*RegisterCustomFormat)(PP_Instance instance_id,
+ const char* format_name);
+ PP_Bool (*IsFormatAvailable)(PP_Instance instance_id,
+ PP_Flash_Clipboard_Type clipboard_type,
+ uint32_t format);
+ struct PP_Var (*ReadData)(PP_Instance instance_id,
+ PP_Flash_Clipboard_Type clipboard_type,
+ uint32_t format);
+ int32_t (*WriteData)(PP_Instance instance_id,
+ PP_Flash_Clipboard_Type clipboard_type,
+ uint32_t data_item_count,
+ const uint32_t formats[],
+ const struct PP_Var data_items[]);
+};
/**
* @}
*/
diff --git a/chromium/ppapi/c/private/ppb_flash_drm.h b/chromium/ppapi/c/private/ppb_flash_drm.h
index 88d0f765b59..62f7226b9f7 100644
--- a/chromium/ppapi/c/private/ppb_flash_drm.h
+++ b/chromium/ppapi/c/private/ppb_flash_drm.h
@@ -48,9 +48,11 @@ struct PPB_Flash_DRM_1_1 {
struct PP_Var* id,
struct PP_CompletionCallback callback);
/**
- * Windows only. Synchronously outputs the HMONITOR corresponding to the
- * monitor on which the plugin instance is displayed in |hmonitor|. PP_TRUE is
- * returned on success.
+ * Windows and Mac only. Synchronously outputs the HMONITOR or
+ * CGDirectDisplayID corresponding to the monitor on which the plugin instance
+ * is displayed in |hmonitor|. This value is queried asynchronously and this
+ * will return PP_FALSE if the value is not yet available or an error
+ * occurred. PP_TRUE is returned on success.
*/
PP_Bool (*GetHmonitor)(PP_Resource drm, int64_t* hmonitor);
/**
diff --git a/chromium/ppapi/c/private/ppb_input_event_private.h b/chromium/ppapi/c/private/ppb_input_event_private.h
new file mode 100644
index 00000000000..9ab20645347
--- /dev/null
+++ b/chromium/ppapi/c/private/ppb_input_event_private.h
@@ -0,0 +1,78 @@
+/* Copyright 2014 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.
+ */
+
+/* From private/ppb_input_event_private.idl,
+ * modified Tue May 20 18:31:39 2014.
+ */
+
+#ifndef PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_
+#define PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_INPUTEVENT_PRIVATE_INTERFACE_0_1 "PPB_InputEvent_Private;0.1"
+#define PPB_INPUTEVENT_PRIVATE_INTERFACE PPB_INPUTEVENT_PRIVATE_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the PPB_InputEvent_Private interfaces.
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * The <code>PPB_InputEvent_Private</code> interface contains pointers to
+ several
+ * functions related to generic input events on the browser.
+ */
+struct PPB_InputEvent_Private_0_1 {
+ /**
+ * TraceInputLatency() traces the latency of the input event. The input
+ * latency is shown in the trace viewer. The starting point of the input
+ * latency is when the input event is sent from renderer to plugin. If the
+ * input event does not cause any rendering damage, the end point of input
+ * latency is when TraceInputLatency() is called on the event. If the input
+ * event does cause rendering damage, the end point of input latency is when
+ * the resulted plugin frame eventually reaches screen.
+ *
+ * Notes: In the current version, only Graphics2D damage is considered as
+ * rendering damage. And it works only when the Graphics2Ds are bound to
+ * the plugin instance.
+ *
+ * @param[in] event A <code>PP_Resource</code> corresponding to an input
+ * event.
+ *
+ * @param[in] has_damage A bool indicating whether the event has caused any
+ * rendering damage.
+ *
+ * @return <code>PP_TRUE</code> if the latency for the given event is tracked.
+ */
+ PP_Bool (*TraceInputLatency)(PP_Resource event, PP_Bool has_damage);
+ /**
+ * StartTrackingLatency() requests input latency to be tracked.
+ *
+ * Without calling StartTrackingLatency() first, TraceInputLatency() won't
+ * take effect.
+ *
+ * @param[in] instance The <code>PP_Instance</code> of the instance requesting
+ * to start tracking input latency.
+ */
+ void (*StartTrackingLatency)(PP_Instance instance);
+};
+
+typedef struct PPB_InputEvent_Private_0_1 PPB_InputEvent_Private;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_ */
+
diff --git a/chromium/ppapi/c/private/ppb_nacl_private.h b/chromium/ppapi/c/private/ppb_nacl_private.h
index 44bbb9fde9b..9df8723a420 100644
--- a/chromium/ppapi/c/private/ppb_nacl_private.h
+++ b/chromium/ppapi/c/private/ppb_nacl_private.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From private/ppb_nacl_private.idl modified Fri Nov 29 09:11:40 2013. */
+/* From private/ppb_nacl_private.idl modified Fri Jun 13 15:14:51 2014. */
#ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
#define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
@@ -14,7 +14,9 @@
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
-#include "ppapi/c/private/ppb_instance_private.h"
+
+#define PPP_MANIFESTSERVICE_INTERFACE_1_0 "PPP_ManifestService;1.0"
+#define PPP_MANIFESTSERVICE_INTERFACE PPP_MANIFESTSERVICE_INTERFACE_1_0
#define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0"
#define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0
@@ -32,13 +34,92 @@
* @addtogroup Enums
* @{
*/
-/** NaCl-specific errors that should be reported to the user */
+/** NaCl-specific errors that should be reported to the user.
+ * These error codes are reported via UMA so, if you edit them:
+ * 1) make sure you understand UMA first.
+ * 2) update src/tools/metrics/histograms/histograms.xml
+ * Values are explicitly specified to make sure they don't shift around when
+ * edited, and also to make reading about:histograms easier.
+ */
typedef enum {
- /**
- * The manifest program element does not contain a program usable on the
- * user's architecture
+ PP_NACL_ERROR_LOAD_SUCCESS = 0,
+ PP_NACL_ERROR_LOAD_ABORTED = 1,
+ PP_NACL_ERROR_UNKNOWN = 2,
+ PP_NACL_ERROR_MANIFEST_RESOLVE_URL = 3,
+ PP_NACL_ERROR_MANIFEST_LOAD_URL = 4,
+ PP_NACL_ERROR_MANIFEST_STAT = 5,
+ PP_NACL_ERROR_MANIFEST_TOO_LARGE = 6,
+ PP_NACL_ERROR_MANIFEST_OPEN = 7,
+ PP_NACL_ERROR_MANIFEST_MEMORY_ALLOC = 8,
+ PP_NACL_ERROR_MANIFEST_READ = 9,
+ PP_NACL_ERROR_MANIFEST_PARSING = 10,
+ PP_NACL_ERROR_MANIFEST_SCHEMA_VALIDATE = 11,
+ PP_NACL_ERROR_MANIFEST_GET_NEXE_URL = 12,
+ PP_NACL_ERROR_NEXE_LOAD_URL = 13,
+ PP_NACL_ERROR_NEXE_ORIGIN_PROTOCOL = 14,
+ PP_NACL_ERROR_NEXE_FH_DUP = 15,
+ PP_NACL_ERROR_NEXE_STAT = 16,
+ PP_NACL_ERROR_ELF_CHECK_IO = 17,
+ PP_NACL_ERROR_ELF_CHECK_FAIL = 18,
+ PP_NACL_ERROR_SEL_LDR_INIT = 19,
+ PP_NACL_ERROR_SEL_LDR_CREATE_LAUNCHER = 20,
+ PP_NACL_ERROR_SEL_LDR_FD = 21,
+ PP_NACL_ERROR_SEL_LDR_LAUNCH = 22,
+ /* Deprecated, safe to reuse the value because it's never logged in UMA.
+ */
+ PP_NACL_ERROR_SEL_LDR_SEND_NEXE = 24,
+ PP_NACL_ERROR_SEL_LDR_HANDLE_PASSING = 25,
+ PP_NACL_ERROR_SEL_LDR_START_MODULE = 26,
+ PP_NACL_ERROR_SEL_LDR_START_STATUS = 27,
+ PP_NACL_ERROR_SRPC_CONNECTION_FAIL = 28,
+ PP_NACL_ERROR_START_PROXY_CHECK_PPP = 29,
+ PP_NACL_ERROR_START_PROXY_ALLOC = 30,
+ PP_NACL_ERROR_START_PROXY_MODULE = 31,
+ PP_NACL_ERROR_START_PROXY_INSTANCE = 32,
+ PP_NACL_ERROR_SEL_LDR_COMMUNICATION_CMD_CHANNEL = 33,
+ PP_NACL_ERROR_SEL_LDR_COMMUNICATION_REV_SETUP = 34,
+ PP_NACL_ERROR_SEL_LDR_COMMUNICATION_WRAPPER = 35,
+ PP_NACL_ERROR_SEL_LDR_COMMUNICATION_REV_SERVICE = 36,
+ PP_NACL_ERROR_START_PROXY_CRASH = 37,
+ PP_NACL_ERROR_MANIFEST_PROGRAM_MISSING_ARCH = 38,
+ PP_NACL_ERROR_PNACL_CACHE_OPEN_INPROGRESS = 39,
+ PP_NACL_ERROR_PNACL_CACHE_OPEN_NOACCESS = 40,
+ PP_NACL_ERROR_PNACL_CACHE_OPEN_NOQUOTA = 41,
+ PP_NACL_ERROR_PNACL_CACHE_OPEN_NOSPACE = 42,
+ PP_NACL_ERROR_PNACL_CACHE_OPEN_OTHER = 43,
+ PP_NACL_ERROR_PNACL_CACHE_DIRECTORY_CREATE = 44,
+ PP_NACL_ERROR_PNACL_CACHE_FILEOPEN_NOACCESS = 45,
+ PP_NACL_ERROR_PNACL_CACHE_FILEOPEN_NOQUOTA = 46,
+ PP_NACL_ERROR_PNACL_CACHE_FILEOPEN_NOSPACE = 47,
+ PP_NACL_ERROR_PNACL_CACHE_FILEOPEN_NOTAFILE = 48,
+ PP_NACL_ERROR_PNACL_CACHE_FILEOPEN_OTHER = 49,
+ PP_NACL_ERROR_PNACL_CACHE_FETCH_NOACCESS = 50,
+ PP_NACL_ERROR_PNACL_CACHE_FETCH_NOTFOUND = 51,
+ PP_NACL_ERROR_PNACL_CACHE_FETCH_OTHER = 52,
+ PP_NACL_ERROR_PNACL_CACHE_FINALIZE_COPY_NOQUOTA = 53,
+ PP_NACL_ERROR_PNACL_CACHE_FINALIZE_COPY_NOSPACE = 54,
+ PP_NACL_ERROR_PNACL_CACHE_FINALIZE_COPY_OTHER = 55,
+ PP_NACL_ERROR_PNACL_CACHE_FINALIZE_RENAME_NOACCESS = 56,
+ PP_NACL_ERROR_PNACL_CACHE_FINALIZE_RENAME_OTHER = 57,
+ PP_NACL_ERROR_PNACL_RESOURCE_FETCH = 58,
+ PP_NACL_ERROR_PNACL_PEXE_FETCH_ABORTED = 59,
+ PP_NACL_ERROR_PNACL_PEXE_FETCH_NOACCESS = 60,
+ PP_NACL_ERROR_PNACL_PEXE_FETCH_OTHER = 61,
+ PP_NACL_ERROR_PNACL_THREAD_CREATE = 62,
+ PP_NACL_ERROR_PNACL_LLC_SETUP = 63,
+ PP_NACL_ERROR_PNACL_LD_SETUP = 64,
+ PP_NACL_ERROR_PNACL_LLC_INTERNAL = 65,
+ PP_NACL_ERROR_PNACL_LD_INTERNAL = 66,
+ PP_NACL_ERROR_PNACL_CREATE_TEMP = 67,
+ /* This entry is no longer used, but should not be removed, because UMA
*/
- PP_NACL_MANIFEST_MISSING_ARCH = 0
+ PP_NACL_ERROR_PNACL_NOT_ENABLED = 68,
+ PP_NACL_ERROR_MANIFEST_NOACCESS_URL = 69,
+ PP_NACL_ERROR_NEXE_NOACCESS_URL = 70,
+ PP_NACL_ERROR_PNACL_CRASH_THROTTLED = 71,
+ /* If you add a code, read the enum comment above on how to update
+ */
+ PP_NACL_ERROR_MAX
} PP_NaClError;
/** Event types that NaCl may use when reporting load progress or errors. */
@@ -51,6 +132,94 @@ typedef enum {
PP_NACL_EVENT_LOADEND,
PP_NACL_EVENT_CRASH
} PP_NaClEventType;
+
+typedef enum {
+ PP_SCHEME_CHROME_EXTENSION,
+ PP_SCHEME_DATA,
+ PP_SCHEME_OTHER
+} PP_UrlSchemeType;
+
+typedef enum {
+ /* The trusted plugin begins in this ready state. */
+ PP_NACL_READY_STATE_UNSENT = 0,
+ /* The manifest file has been requested, but not yet received. */
+ PP_NACL_READY_STATE_OPENED = 1,
+ /* The manifest file has been received and the nexe successfully requested. */
+ PP_NACL_READY_STATE_LOADING = 3,
+ /* The nexe has been loaded and the proxy started, so it is ready for
+ */
+ PP_NACL_READY_STATE_DONE = 4
+} PP_NaClReadyState;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Structs
+ * @{
+ */
+struct PP_PNaClOptions {
+ PP_Bool translate;
+ PP_Bool is_debug;
+ int32_t opt_level;
+};
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Typedefs
+ * @{
+ */
+/* Callback invoked upon completion of PPP_ManifestService::OpenResource(). */
+typedef void (*PP_OpenResourceCompletionCallback)(void* user_data,
+ PP_FileHandle file_handle);
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/* ManifestService to support irt_open_resource() function.
+ * All functions of the service should have PP_Bool return value. It represents
+ * whether the service is still alive or not. Trivially Quit() should always
+ * return false. However, other functions also can return false.
+ * Once false is called, as the service has been destructed, all functions
+ * should never be called afterwords.
+ */
+struct PPP_ManifestService_1_0 {
+ /* Called when ManifestService should be destructed. */
+ PP_Bool (*Quit)(void* user_data);
+ /* Called when PPAPI initialization in the NaCl plugin is finished. */
+ PP_Bool (*StartupInitializationComplete)(void* user_data);
+ /* Called when irt_open_resource() is invoked in the NaCl plugin.
+ * Upon completion, callback will be invoked with given callback_user_data
+ * and the result file handle (or PP_kInvalidFileHandle on error). */
+ PP_Bool (*OpenResource)(void* user_data,
+ const char* entry_key,
+ PP_OpenResourceCompletionCallback callback,
+ void* callback_user_data);
+};
+
+typedef struct PPP_ManifestService_1_0 PPP_ManifestService;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Structs
+ * @{
+ */
+/* Corresponds to NaClFileInfo in
+ * native_client/src/trusted/validator/nacl_file_info.h */
+struct PP_NaClFileInfo {
+ PP_FileHandle handle;
+ /* See NaClFileToken comment in nacl_file_info.h */
+ uint64_t token_lo;
+ uint64_t token_hi;
+};
/**
* @}
*/
@@ -70,6 +239,8 @@ struct PPB_NaCl_Private_1_0 {
* does not need PPAPI, then it can run off the main thread.
* The |uses_irt| flag indicates whether the IRT should be loaded in this
* NaCl process. This is true for ABI stable nexes.
+ * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should
+ * be used with the binary pointed by the url.
* The |enable_dyncode_syscalls| flag indicates whether or not the nexe
* will be able to use dynamic code system calls (e.g., mmap with PROT_EXEC).
* The |enable_exception_handling| flag indicates whether or not the nexe
@@ -78,25 +249,25 @@ struct PPB_NaCl_Private_1_0 {
* the nexe contribute to crash throttling statisics and whether nexe starts
* are throttled by crash throttling.
*/
- PP_ExternalPluginResult (*LaunchSelLdr)(PP_Instance instance,
- const char* alleged_url,
- PP_Bool uses_irt,
- PP_Bool uses_ppapi,
- PP_Bool enable_ppapi_dev,
- PP_Bool enable_dyncode_syscalls,
- PP_Bool enable_exception_handling,
- PP_Bool enable_crash_throttling,
- void* imc_handle,
- struct PP_Var* error_message);
+ void (*LaunchSelLdr)(
+ PP_Instance instance,
+ PP_Bool main_service_runtime,
+ const char* alleged_url,
+ PP_Bool uses_irt,
+ PP_Bool uses_ppapi,
+ PP_Bool uses_nonsfi_mode,
+ PP_Bool enable_ppapi_dev,
+ PP_Bool enable_dyncode_syscalls,
+ PP_Bool enable_exception_handling,
+ PP_Bool enable_crash_throttling,
+ const struct PPP_ManifestService_1_0* manifest_service_interface,
+ void* manifest_service_user_data,
+ void* imc_handle,
+ struct PP_CompletionCallback callback);
/* This function starts the IPC proxy so the nexe can communicate with the
- * browser. Returns PP_EXTERNAL_PLUGIN_OK on success, otherwise a result code
- * indicating the failure. PP_EXTERNAL_PLUGIN_FAILED is returned if
- * LaunchSelLdr wasn't called with the instance.
- * PP_EXTERNAL_PLUGIN_ERROR_MODULE is returned if the module can't be
- * initialized. PP_EXTERNAL_PLUGIN_ERROR_INSTANCE is returned if the instance
- * can't be initialized.
- */
- PP_ExternalPluginResult (*StartPpapiProxy)(PP_Instance instance);
+ * browser.
+ */
+ PP_Bool (*StartPpapiProxy)(PP_Instance instance);
/* On POSIX systems, this function returns the file descriptor of
* /dev/urandom. On non-POSIX systems, this function returns 0.
*/
@@ -117,36 +288,37 @@ struct PPB_NaCl_Private_1_0 {
PP_FileHandle* target_handle,
uint32_t desired_access,
uint32_t options);
- /* Returns a read-only file descriptor of a file rooted in the Pnacl
- * component directory, or an invalid handle on failure.
+ /* Returns a read-only file descriptor for a url for pnacl translator tools,
+ * or an invalid handle on failure.
*/
- PP_FileHandle (*GetReadonlyPnaclFd)(const char* filename);
+ PP_FileHandle (*GetReadonlyPnaclFd)(const char* url);
/* This creates a temporary file that will be deleted by the time
* the last handle is closed (or earlier on POSIX systems), and
* returns a posix handle to that temporary file.
*/
PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance);
+ /* Return the number of processors in the system as reported by the OS */
+ int32_t (*GetNumberOfProcessors)(void);
+ /* Return whether the non-SFI mode is enabled. */
+ PP_Bool (*IsNonSFIModeEnabled)(void);
/* Create a temporary file, which will be deleted by the time the
* last handle is closed (or earlier on POSIX systems), to use for
* the nexe with the cache information given by |pexe_url|,
- * |abi_version|, |opt_level|, |last_modified|, |etag|, and
- * |has_no_store_header|. If the nexe is already present in the
- * cache, |is_hit| is set to PP_TRUE and the contents of the nexe
- * will be copied into the temporary file. Otherwise |is_hit| is set
- * to PP_FALSE and the temporary file will be writeable. Currently
- * the implementation is a stub, which always sets is_hit to false
- * and calls the implementation of CreateTemporaryFile. In a
- * subsequent CL it will call into the browser which will remember
- * the association between the cache key and the fd, and copy the
- * nexe into the cache after the translation finishes.
+ * |abi_version|, |opt_level|, and |headers|. If the nexe is already present
+ * in the cache, |is_hit| is set to PP_TRUE and the contents of the nexe will
+ * be copied into the temporary file. Otherwise |is_hit| is set to PP_FALSE
+ * and the temporary file will be writeable. Currently the implementation is
+ * a stub, which always sets is_hit to false and calls the implementation of
+ * CreateTemporaryFile. In a subsequent CL it will call into the browser
+ * which will remember the association between the cache key and the fd, and
+ * copy the nexe into the cache after the translation finishes.
*/
int32_t (*GetNexeFd)(PP_Instance instance,
const char* pexe_url,
uint32_t abi_version,
uint32_t opt_level,
- const char* last_modified,
- const char* etag,
- PP_Bool has_no_store_header,
+ const char* headers,
+ const char* extra_flags,
PP_Bool* is_hit,
PP_FileHandle* nexe_handle,
struct PP_CompletionCallback callback);
@@ -159,33 +331,124 @@ struct PPB_NaCl_Private_1_0 {
* the browser is in incognito mode, no notification will be delivered to
* the plugin.)
*/
- void (*ReportTranslationFinished)(PP_Instance instance, PP_Bool success);
- /* Display a UI message to the user. */
- PP_ExternalPluginResult (*ReportNaClError)(PP_Instance instance,
- PP_NaClError message_id);
- /* Opens a NaCl executable file in the application's extension directory
- * corresponding to the file URL and returns a file descriptor, or an invalid
- * handle on failure. |metadata| is left unchanged on failure.
- */
- PP_FileHandle (*OpenNaClExecutable)(PP_Instance instance,
- const char* file_url,
- uint64_t* file_token_lo,
- uint64_t* file_token_hi);
+ void (*ReportTranslationFinished)(PP_Instance instance,
+ PP_Bool success,
+ int32_t opt_level,
+ int64_t pexe_size,
+ int64_t compile_time_us,
+ int64_t total_time_us);
/* Dispatch a progress event on the DOM element where the given instance is
* embedded.
*/
void (*DispatchEvent)(PP_Instance instance,
PP_NaClEventType event_type,
- struct PP_Var resource_url,
+ const char* resource_url,
PP_Bool length_is_computable,
uint64_t loaded_bytes,
uint64_t total_bytes);
- /* Sets a read-only property on the <embed> DOM element that corresponds to
- * the given instance.
+ /* Report that the nexe loaded successfully. */
+ void (*ReportLoadSuccess)(PP_Instance instance,
+ const char* url,
+ uint64_t loaded_bytes,
+ uint64_t total_bytes);
+ /* Report an error that occured while attempting to load a nexe. */
+ void (*ReportLoadError)(PP_Instance instance,
+ PP_NaClError error,
+ const char* error_message);
+ /* Reports that loading a nexe was aborted. */
+ void (*ReportLoadAbort)(PP_Instance instance);
+ /* Reports that the nexe has crashed. */
+ void (*NexeDidCrash)(PP_Instance instance, const char* crash_log);
+ /* Performs internal setup when an instance is created. */
+ void (*InstanceCreated)(PP_Instance instance);
+ /* Performs internal cleanup when an instance is destroyed. */
+ void (*InstanceDestroyed)(PP_Instance instance);
+ /* Return true if the NaCl debug stub is enabled and the app loaded from
+ * alleged_nmf_url will be attached to a debugger.
+ */
+ PP_Bool (*NaClDebugEnabledForURL)(const char* alleged_nmf_url);
+ /* Returns the kind of SFI sandbox implemented by NaCl on this
+ * platform.
+ */
+ const char* (*GetSandboxArch)(void);
+ /* Logs the message to the console. */
+ void (*LogToConsole)(PP_Instance instance, const char* message);
+ /* Returns the NaCl readiness status for this instance. */
+ PP_NaClReadyState (*GetNaClReadyState)(PP_Instance instance);
+ /* Returns the exit status of the plugin process. */
+ int32_t (*GetExitStatus)(PP_Instance instance);
+ /* Sets the exit status of the plugin process. */
+ void (*SetExitStatus)(PP_Instance instance, int32_t exit_status);
+ /* Logs the message via VLOG. */
+ void (*Vlog)(const char* message);
+ /* Initializes internal state for a NaCl plugin. */
+ void (*InitializePlugin)(PP_Instance instance,
+ uint32_t argc,
+ const char* argn[],
+ const char* argv[]);
+ /* Returns the size of the nexe. */
+ int64_t (*GetNexeSize)(PP_Instance instance);
+ /* Requests the NaCl manifest specified in the plugin arguments. */
+ void (*RequestNaClManifest)(PP_Instance instance,
+ struct PP_CompletionCallback callback);
+ struct PP_Var (*GetManifestBaseURL)(PP_Instance instance);
+ /* Processes the NaCl manifest once it's been retrieved.
+ * TODO(teravest): Move the rest of the supporting logic out of the trusted
+ * plugin.
+ */
+ void (*ProcessNaClManifest)(PP_Instance instance, const char* program_url);
+ PP_Bool (*DevInterfacesEnabled)(PP_Instance instance);
+ PP_Bool (*GetManifestProgramURL)(PP_Instance instance,
+ struct PP_Var* full_url,
+ struct PP_PNaClOptions* pnacl_options,
+ PP_Bool* uses_nonsfi_mode);
+ PP_Bool (*ManifestResolveKey)(PP_Instance instance,
+ PP_Bool helper_process,
+ const char* key,
+ struct PP_Var* full_url,
+ struct PP_PNaClOptions* pnacl_options);
+ /* Returns the filenames for the llc and ld tools, parsing that information
+ * from the file given in |filename|.
+ */
+ PP_Bool (*GetPnaclResourceInfo)(PP_Instance instance,
+ const char* filename,
+ struct PP_Var* llc_tool_name,
+ struct PP_Var* ld_tool_name);
+ /* PP_Var string of attributes describing the CPU features supported
+ * by the current architecture. The string is a comma-delimited list
+ * of attributes supported by LLVM in its -mattr= option:
+ * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */
+ struct PP_Var (*GetCpuFeatureAttrs)(void);
+ /* Posts a message to the JavaScript object for the given instance.
+ * This method may be called on any thread.
+ */
+ void (*PostMessageToJavaScript)(PP_Instance instance, const char* message);
+ /* Downloads the .nexe file at the given URL to a file, and sets |file_info|
+ * to information for a handle to a file containing its contents.
+ * If metadata for identity-based validation caching is available
+ * then it sets token information in |file_info| (otherwise left untouched).
+ */
+ void (*DownloadNexe)(PP_Instance instance,
+ const char* url,
+ struct PP_NaClFileInfo* file_info,
+ struct PP_CompletionCallback callback);
+ /* Downloads a non-nexe file specified in the manifest, and sets |file_info|
+ * to corresponding information about the file. */
+ void (*DownloadFile)(PP_Instance instance,
+ const char* url,
+ struct PP_NaClFileInfo* file_info,
+ struct PP_CompletionCallback callback);
+ /* Reports the status of sel_ldr for UMA reporting.
+ * |max_status| has to be provided because the implementation of this
+ * interface can't access the NaClErrorCode enum.
+ */
+ void (*ReportSelLdrStatus)(PP_Instance instance,
+ int32_t load_status,
+ int32_t max_status);
+ /* Logs time taken by an operation to UMA histograms.
+ * This function is safe to call on any thread.
*/
- void (*SetReadOnlyProperty)(PP_Instance instance,
- struct PP_Var key,
- struct PP_Var value);
+ void (*LogTranslateTime)(const char* histogram_name, int64_t time_us);
};
typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private;
diff --git a/chromium/ppapi/c/private/ppb_pdf.h b/chromium/ppapi/c/private/ppb_pdf.h
index 9053802b897..c0b570bc6bb 100644
--- a/chromium/ppapi/c/private/ppb_pdf.h
+++ b/chromium/ppapi/c/private/ppb_pdf.h
@@ -163,6 +163,12 @@ struct PPB_PDF {
// Returns PP_TRUE if the plugin is out of process.
PP_Bool(*IsOutOfProcess)(PP_Instance instance);
+
+ // Sets the selected text of the plugin.
+ void(*SetSelectedText)(PP_Instance instance, const char* selected_text);
+
+ // Sets the link currently under the cursor.
+ void (*SetLinkUnderCursor)(PP_Instance instance, const char* url);
};
#endif // PPAPI_C_PRIVATE_PPB_PDF_H_
diff --git a/chromium/ppapi/c/private/ppb_uma_private.h b/chromium/ppapi/c/private/ppb_uma_private.h
index b681addef66..04cad428c16 100644
--- a/chromium/ppapi/c/private/ppb_uma_private.h
+++ b/chromium/ppapi/c/private/ppb_uma_private.h
@@ -3,18 +3,20 @@
* found in the LICENSE file.
*/
-/* From private/ppb_uma_private.idl modified Tue Oct 2 13:17:06 2012. */
+/* From private/ppb_uma_private.idl modified Fri Mar 14 16:59:33 2014. */
#ifndef PPAPI_C_PRIVATE_PPB_UMA_PRIVATE_H_
#define PPAPI_C_PRIVATE_PPB_UMA_PRIVATE_H_
#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
-#define PPB_UMA_PRIVATE_INTERFACE_0_1 "PPB_UMA_Private;0.1"
-#define PPB_UMA_PRIVATE_INTERFACE PPB_UMA_PRIVATE_INTERFACE_0_1
+#define PPB_UMA_PRIVATE_INTERFACE_0_3 "PPB_UMA_Private;0.3"
+#define PPB_UMA_PRIVATE_INTERFACE PPB_UMA_PRIVATE_INTERFACE_0_3
/**
* @file
@@ -29,13 +31,14 @@
/**
* Contains functions for plugins to report UMA usage stats.
*/
-struct PPB_UMA_Private_0_1 {
+struct PPB_UMA_Private_0_3 {
/**
* HistogramCustomTimes is a pointer to a function which records a time
* sample given in milliseconds in the histogram given by |name|, possibly
* creating the histogram if it does not exist.
*/
- void (*HistogramCustomTimes)(struct PP_Var name,
+ void (*HistogramCustomTimes)(PP_Instance instance,
+ struct PP_Var name,
int64_t sample,
int64_t min,
int64_t max,
@@ -45,7 +48,8 @@ struct PPB_UMA_Private_0_1 {
* in the histogram given by |name|, possibly creating the histogram if it
* does not exist.
*/
- void (*HistogramCustomCounts)(struct PP_Var name,
+ void (*HistogramCustomCounts)(PP_Instance instance,
+ struct PP_Var name,
int32_t sample,
int32_t min,
int32_t max,
@@ -56,12 +60,21 @@ struct PPB_UMA_Private_0_1 {
* does not exist. The sample represents a value in an enumeration bounded
* by |boundary_value|, that is, sample < boundary_value always.
*/
- void (*HistogramEnumeration)(struct PP_Var name,
+ void (*HistogramEnumeration)(PP_Instance instance,
+ struct PP_Var name,
int32_t sample,
int32_t boundary_value);
+ /**
+ * IsCrashReportingEnabled returns PP_OK to the completion callback to
+ * indicate that the current user has opted-in to crash reporting, or
+ * PP_ERROR_* on failure or when a user has not opted-in. This can be used to
+ * gate other reporting processes such as analytics and crash reporting.
+ */
+ int32_t (*IsCrashReportingEnabled)(PP_Instance instance,
+ struct PP_CompletionCallback callback);
};
-typedef struct PPB_UMA_Private_0_1 PPB_UMA_Private;
+typedef struct PPB_UMA_Private_0_3 PPB_UMA_Private;
/**
* @}
*/
diff --git a/chromium/ppapi/c/private/ppp_content_decryptor_private.h b/chromium/ppapi/c/private/ppp_content_decryptor_private.h
index 27d172d7e73..3470005802a 100644
--- a/chromium/ppapi/c/private/ppp_content_decryptor_private.h
+++ b/chromium/ppapi/c/private/ppp_content_decryptor_private.h
@@ -4,7 +4,7 @@
*/
/* From private/ppp_content_decryptor_private.idl,
- * modified Tue Dec 3 17:05:10 2013.
+ * modified Thu May 1 10:36:31 2014.
*/
#ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_
@@ -18,10 +18,10 @@
#include "ppapi/c/pp_var.h"
#include "ppapi/c/private/pp_content_decryptor.h"
-#define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_9 \
- "PPP_ContentDecryptor_Private;0.9"
+#define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_12 \
+ "PPP_ContentDecryptor_Private;0.12"
#define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \
- PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_9
+ PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_12
/**
* @file
@@ -42,7 +42,7 @@
* Decryption Module (CDM) for Encrypted Media Extensions:
* http://www.w3.org/TR/encrypted-media/
*/
-struct PPP_ContentDecryptor_Private_0_9 {
+struct PPP_ContentDecryptor_Private_0_12 {
/**
* Initialize for the specified key system.
*
@@ -51,29 +51,49 @@ struct PPP_ContentDecryptor_Private_0_9 {
*/
void (*Initialize)(PP_Instance instance, struct PP_Var key_system);
/**
- * Creates a session. <code>type</code> contains the MIME type of
+ * Creates a session. <code>init_data_type</code> contains the MIME type of
* <code>init_data</code>. <code>init_data</code> is a data buffer
* containing data for use in generating the request.
*
- * Note: <code>CreateSession()</code> must create the session ID used in
- * other methods on this interface. The session ID must be provided to the
- * browser by the CDM via <code>SessionCreated()</code> on the
+ * Note: <code>CreateSession()</code> must create a web session ID and provide
+ * it to the browser via <code>SessionCreated()</code> on the
* <code>PPB_ContentDecryptor_Private</code> interface.
*
- * @param[in] session_id A reference for the session for which a session
- * should be generated.
+ * @param[in] promise_id A reference for the promise that gets resolved or
+ * rejected depending upon the success or failure when creating the session.
*
- * @param[in] type A <code>PP_Var</code> of type
+ * @param[in] init_data_type A <code>PP_Var</code> of type
* <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data.
*
* @param[in] init_data A <code>PP_Var</code> of type
* <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
* initialization data.
+ *
+ * @param[in] session_type A <code>PP_SessionType</code> that indicates the
+ * type of session to be created.
*/
void (*CreateSession)(PP_Instance instance,
- uint32_t session_id,
- struct PP_Var type,
- struct PP_Var init_data);
+ uint32_t promise_id,
+ struct PP_Var init_data_type,
+ struct PP_Var init_data,
+ PP_SessionType session_type);
+ /**
+ * Loads a session whose web session ID is <code>web_session_id</code>.
+ *
+ * Note: After the session is successfully loaded, the CDM must call
+ * <code>SessionCreated()</code> with <code>web_session_id</code> on the
+ * <code>PPB_ContentDecryptor_Private</code> interface.
+ *
+ * @param[in] promise_id A reference for the promise that gets resolved or
+ * rejected depending upon the success or failure of loading the session.
+ *
+ * @param[in] web_session_id A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
+ * to load.
+ */
+ void (*LoadSession)(PP_Instance instance,
+ uint32_t promise_id,
+ struct PP_Var web_session_id);
/**
* Provides a license or other message to the decryptor.
*
@@ -86,22 +106,35 @@ struct PPP_ContentDecryptor_Private_0_9 {
* <code>PPB_ContentDecryptor_Private</code> interface, and the browser
* must notify the web application.
*
- * @param[in] session_id A reference for the session to update.
+ * @param[in] promise_id A reference for the promise that gets resolved or
+ * rejected depending upon the success or failure of updating the session.
+ *
+ * @param[in] web_session_id A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
+ * to be updated.
*
* @param[in] response A <code>PP_Var</code> of type
* <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other
* message for the given session ID.
*/
void (*UpdateSession)(PP_Instance instance,
- uint32_t session_id,
+ uint32_t promise_id,
+ struct PP_Var web_session_id,
struct PP_Var response);
/**
* Release the specified session and related resources.
*
- * @param[in] session_id A reference for the session that should be
- * released.
+ * @param[in] promise_id A reference for the promise that gets resolved or
+ * rejected depending upon the success or failure of releasing the session.
+ *
+ * @param[in] web_session_id A <code>PP_Var</code> of type
+ * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
+ * to be released.
+ *
*/
- void (*ReleaseSession)(PP_Instance instance, uint32_t session_id);
+ void (*ReleaseSession)(PP_Instance instance,
+ uint32_t promise_id,
+ struct PP_Var web_session_id);
/**
* Decrypts the block and returns the unencrypted block via
* <code>DeliverBlock()</code> on the
@@ -228,7 +261,7 @@ struct PPP_ContentDecryptor_Private_0_9 {
const struct PP_EncryptedBlockInfo* encrypted_block_info);
};
-typedef struct PPP_ContentDecryptor_Private_0_9 PPP_ContentDecryptor_Private;
+typedef struct PPP_ContentDecryptor_Private_0_12 PPP_ContentDecryptor_Private;
/**
* @}
*/
diff --git a/chromium/ppapi/c/private/ppp_find_private.h b/chromium/ppapi/c/private/ppp_find_private.h
new file mode 100644
index 00000000000..00b26de62bd
--- /dev/null
+++ b/chromium/ppapi/c/private/ppp_find_private.h
@@ -0,0 +1,58 @@
+/* Copyright 2014 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.
+ */
+
+/* From private/ppp_find_private.idl modified Thu Mar 20 11:34:17 2014. */
+
+#ifndef PPAPI_C_PRIVATE_PPP_FIND_PRIVATE_H_
+#define PPAPI_C_PRIVATE_PPP_FIND_PRIVATE_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPP_FIND_PRIVATE_INTERFACE_0_3 "PPP_Find_Private;0.3"
+#define PPP_FIND_PRIVATE_INTERFACE PPP_FIND_PRIVATE_INTERFACE_0_3
+
+/**
+ * @file
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+struct PPP_Find_Private_0_3 {
+ /**
+ * Finds the given UTF-8 text starting at the current selection. The number of
+ * results will be updated asynchronously via NumberOfFindResultsChanged in
+ * PPB_Find. Note that multiple StartFind calls can happen before StopFind is
+ * called in the case of the search term changing.
+ *
+ * Return PP_FALSE if the plugin doesn't support find in page. Consequently,
+ * it won't call any callbacks.
+ */
+ PP_Bool (*StartFind)(PP_Instance instance,
+ const char* text,
+ PP_Bool case_sensitive);
+ /**
+ * Go to the next/previous result.
+ */
+ void (*SelectFindResult)(PP_Instance instance, PP_Bool forward);
+ /**
+ * Tells the plugin that the find operation has stopped, so it should clear
+ * any highlighting.
+ */
+ void (*StopFind)(PP_Instance instance);
+};
+
+typedef struct PPP_Find_Private_0_3 PPP_Find_Private;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PRIVATE_PPP_FIND_PRIVATE_H_ */
+
diff --git a/chromium/ppapi/c/private/ppp_pdf.h b/chromium/ppapi/c/private/ppp_pdf.h
new file mode 100644
index 00000000000..144e95cdff7
--- /dev/null
+++ b/chromium/ppapi/c/private/ppp_pdf.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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.
+
+#ifndef PPAPI_C_PRIVATE_PPP_PDF_H_
+#define PPAPI_C_PRIVATE_PPP_PDF_H_
+
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_point.h"
+#include "ppapi/c/pp_var.h"
+
+#define PPP_PDF_INTERFACE_1 "PPP_Pdf;1"
+#define PPP_PDF_INTERFACE PPP_PDF_INTERFACE_1
+
+typedef enum {
+ // Rotates the page 90 degrees clockwise from its current orientation.
+ PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CW,
+ // Rotates the page 90 degrees counterclockwise from its current orientation.
+ PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CCW
+} PP_PrivatePageTransformType;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrivatePageTransformType, 4);
+
+struct PPP_Pdf_1 {
+ // Returns an absolute URL if the position is over a link.
+ PP_Var (*GetLinkAtPosition)(PP_Instance instance,
+ PP_Point point);
+
+ // Requests that the plugin apply the given transform to its view.
+ void (*Transform)(PP_Instance instance, PP_PrivatePageTransformType type);
+};
+
+typedef PPP_Pdf_1 PPP_Pdf;
+
+#endif // PPAPI_C_PRIVATE_PPP_PDF_H_