summaryrefslogtreecommitdiffstats
path: root/chromium/ppapi/api
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/api
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/api')
-rw-r--r--chromium/ppapi/api/dev/pp_optional_structs_dev.idl14
-rw-r--r--chromium/ppapi/api/dev/ppb_alarms_dev.idl181
-rw-r--r--chromium/ppapi/api/dev/ppb_audio_input_dev.idl28
-rw-r--r--chromium/ppapi/api/dev/ppb_file_io_dev.idl116
-rw-r--r--chromium/ppapi/api/dev/ppb_find_dev.idl35
-rw-r--r--chromium/ppapi/api/dev/ppb_graphics_2d_dev.idl96
-rw-r--r--chromium/ppapi/api/dev/ppb_keyboard_input_event_dev.idl60
-rw-r--r--chromium/ppapi/api/dev/ppb_resource_array_dev.idl68
-rw-r--r--chromium/ppapi/api/dev/ppb_var_resource_dev.idl38
-rw-r--r--chromium/ppapi/api/dev/ppb_video_capture_dev.idl20
-rw-r--r--chromium/ppapi/api/extensions/dev/ppb_ext_socket_dev.idl542
-rw-r--r--chromium/ppapi/api/pp_codecs.idl57
-rw-r--r--chromium/ppapi/api/pp_errors.idl12
-rw-r--r--chromium/ppapi/api/pp_macros.idl16
-rw-r--r--chromium/ppapi/api/pp_rect.idl39
-rw-r--r--chromium/ppapi/api/pp_size.idl26
-rw-r--r--chromium/ppapi/api/pp_var.idl31
-rw-r--r--chromium/ppapi/api/ppb.idl2
-rw-r--r--chromium/ppapi/api/ppb_audio.idl2
-rw-r--r--chromium/ppapi/api/ppb_audio_buffer.idl140
-rw-r--r--chromium/ppapi/api/ppb_audio_config.idl2
-rw-r--r--chromium/ppapi/api/ppb_compositor.idl131
-rw-r--r--chromium/ppapi/api/ppb_compositor_layer.idl222
-rw-r--r--chromium/ppapi/api/ppb_file_mapping.idl131
-rw-r--r--chromium/ppapi/api/ppb_file_ref.idl43
-rw-r--r--chromium/ppapi/api/ppb_input_event.idl69
-rw-r--r--chromium/ppapi/api/ppb_media_stream_audio_track.idl201
-rw-r--r--chromium/ppapi/api/ppb_media_stream_video_track.idl247
-rw-r--r--chromium/ppapi/api/ppb_message_loop.idl4
-rw-r--r--chromium/ppapi/api/ppb_messaging.idl62
-rw-r--r--chromium/ppapi/api/ppb_var.idl45
-rw-r--r--chromium/ppapi/api/ppb_video_decoder.idl216
-rw-r--r--chromium/ppapi/api/ppb_video_frame.idl123
-rw-r--r--chromium/ppapi/api/ppb_view.idl26
-rw-r--r--chromium/ppapi/api/ppp_input_event.idl8
-rw-r--r--chromium/ppapi/api/ppp_message_handler.idl70
-rw-r--r--chromium/ppapi/api/private/finish_writing_these/ppb_pdf.idl12
-rw-r--r--chromium/ppapi/api/private/pp_content_decryptor.idl41
-rw-r--r--chromium/ppapi/api/private/ppb_content_decryptor_private.idl83
-rw-r--r--chromium/ppapi/api/private/ppb_display_color_profile_private.idl97
-rw-r--r--chromium/ppapi/api/private/ppb_find_private.idl66
-rw-r--r--chromium/ppapi/api/private/ppb_flash_clipboard.idl14
-rw-r--r--chromium/ppapi/api/private/ppb_flash_drm.idl8
-rw-r--r--chromium/ppapi/api/private/ppb_input_event_private.idl54
-rw-r--r--chromium/ppapi/api/private/ppb_nacl_private.idl385
-rw-r--r--chromium/ppapi/api/private/ppb_uma_private.idl27
-rw-r--r--chromium/ppapi/api/private/ppp_content_decryptor_private.idl66
-rw-r--r--chromium/ppapi/api/private/ppp_find_private.idl35
48 files changed, 2635 insertions, 1376 deletions
diff --git a/chromium/ppapi/api/dev/pp_optional_structs_dev.idl b/chromium/ppapi/api/dev/pp_optional_structs_dev.idl
deleted file mode 100644
index 3e0829fe40f..00000000000
--- a/chromium/ppapi/api/dev/pp_optional_structs_dev.idl
+++ /dev/null
@@ -1,14 +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.
- */
-
-/**
- * This file defines optional structs for primitive types.
- */
-
-struct PP_Optional_Double_Dev {
- double_t value;
- PP_Bool is_set;
-};
-
diff --git a/chromium/ppapi/api/dev/ppb_alarms_dev.idl b/chromium/ppapi/api/dev/ppb_alarms_dev.idl
deleted file mode 100644
index b2345c4c5cb..00000000000
--- a/chromium/ppapi/api/dev/ppb_alarms_dev.idl
+++ /dev/null
@@ -1,181 +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.
- */
-
-/**
- * This file defines the Pepper equivalent of the <code>chrome.alarms</code>
- * extension API.
- */
-
-label Chrome {
- M33 = 0.1
-};
-
-struct PP_Alarms_Alarm_Dev {
- /**
- * Name of this alarm.
- */
- 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_t scheduled_time;
- /**
- * If set, the alarm is a repeating alarm and will fire again in
- * <code>period_in_minutes</code> minutes.
- */
- PP_Optional_Double_Dev period_in_minutes;
-};
-
-struct PP_Alarms_AlarmCreateInfo_Dev {
- /**
- * Time at which the alarm should fire, in milliseconds past the epoch.
- */
- PP_Optional_Double_Dev when;
- /**
- * Length of time in minutes after which the
- * <code>PP_Alarms_OnAlarm_Dev</code> event should fire.
- */
- 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.
- */
- PP_Optional_Double_Dev period_in_minutes;
-};
-
-struct PP_Alarms_Alarm_Array_Dev {
- uint32_t size;
- [size_is(count)] PP_Alarms_Alarm_Dev[] elements;
-};
-
-/**
- * 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(
- [in] uint32_t listener_id,
- [inout] mem_t user_data,
- [in] PP_Alarms_Alarm_Dev alarm);
-
-interface PPB_Alarms_Dev {
- /**
- * 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(
- [in] PP_Instance instance,
- [in] PP_Var name,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var name,
- [out] PP_Alarms_Alarm_Dev alarm,
- [in] 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(
- [in] PP_Instance instance,
- [out] PP_Alarms_Alarm_Array_Dev alarms,
- [in] PP_ArrayOutput array_allocator,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var name);
-
- /**
- * Clears all alarms.
- *
- * @param[in] instance A <code>PP_Instance</code>.
- */
- void ClearAll(
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Alarms_OnAlarm_Dev callback,
- [inout] mem_t user_data);
-};
diff --git a/chromium/ppapi/api/dev/ppb_audio_input_dev.idl b/chromium/ppapi/api/dev/ppb_audio_input_dev.idl
index fe960253898..71ce6eb7525 100644
--- a/chromium/ppapi/api/dev/ppb_audio_input_dev.idl
+++ b/chromium/ppapi/api/dev/ppb_audio_input_dev.idl
@@ -9,7 +9,6 @@
*/
label Chrome {
- M19 = 0.2,
M25 = 0.3,
M30 = 0.4
};
@@ -75,33 +74,6 @@ interface PPB_AudioInput_Dev {
/**
* Enumerates audio input devices.
*
- * Please note that:
- * - this method ignores the previous value pointed to by <code>devices</code>
- * (won't release reference even if it is not 0);
- * - <code>devices</code> must be valid until <code>callback</code> is called,
- * if the method returns <code>PP_OK_COMPLETIONPENDING</code>;
- * - the ref count of the returned <code>devices</code> has already been
- * increased by 1 for the caller.
- *
- * @param[in] audio_input A <code>PP_Resource</code> corresponding to an audio
- * input resource.
- * @param[out] devices Once the operation is completed successfully,
- * <code>devices</code> will be set to a <code>PPB_ResourceArray_Dev</code>
- * resource, which holds a list of <code>PPB_DeviceRef_Dev</code> resources.
- * @param[in] callback A <code>PP_CompletionCallback</code> to run on
- * completion.
- *
- * @return An error code from <code>pp_errors.h</code>.
- */
- [deprecate=0.3]
- int32_t EnumerateDevices(
- [in] PP_Resource audio_input,
- [out] PP_Resource devices,
- [in] PP_CompletionCallback callback);
-
- /**
- * Enumerates audio input devices.
- *
* @param[in] audio_input A <code>PP_Resource</code> corresponding to an audio
* input resource.
* @param[in] output An output array which will receive
diff --git a/chromium/ppapi/api/dev/ppb_file_io_dev.idl b/chromium/ppapi/api/dev/ppb_file_io_dev.idl
deleted file mode 100644
index 82a64521116..00000000000
--- a/chromium/ppapi/api/dev/ppb_file_io_dev.idl
+++ /dev/null
@@ -1,116 +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.
- */
-
-
-/**
- * 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.
- */
-
-label Chrome {
- M31 = 0.1
-};
-
-/**
- * The PP_FileMapProtection values indicate the permissions requested for the
- * file mapping. These should be used in a uint32_t bitfield.
- */
-[assert_size(4)]
- enum PP_FileMapProtection {
- /** Requests read access to the mapped address. */
- PP_FILEMAPPROTECTION_READ = 1u << 0,
-
- /** Requests write access to the mapped address. */
- PP_FILEMAPPROTECTION_WRITE = 1u << 1
-};
-
-/**
- * The PP_FileMapFlags contain flag values for use with Map().
- */
-[assert_size(4)]
- enum PP_FileMapFlags {
- /**
- * 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
-};
-
-/**
- * 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.
- */
-interface PPB_FileIO_Dev {
- /**
- * 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([in] PP_Resource file_io,
- [in] int64_t length,
- [in] uint32_t map_protection,
- [in] uint32_t map_flags,
- [in] int64_t offset,
- [inout] mem_ptr_t address,
- [in] 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, mem_t address, int64_t length);
-
- /**
- * GetMapPageSize() returns the size of pages that Map() uses. Returns 0 on
- * failure.
- */
- [on_failure=0]
- int64_t GetMapPageSize(PP_Resource file_io);
-};
-
diff --git a/chromium/ppapi/api/dev/ppb_find_dev.idl b/chromium/ppapi/api/dev/ppb_find_dev.idl
deleted file mode 100644
index 4f92f1ce971..00000000000
--- a/chromium/ppapi/api/dev/ppb_find_dev.idl
+++ /dev/null
@@ -1,35 +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.
- */
-
-/**
- * This file defines the <code>PPB_Find_Dev</code> interface.
- */
-
-[generate_thunk]
-
-label Chrome {
- M14 = 0.3
-};
-
-interface PPB_Find_Dev {
- /**
- * 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(
- [in] PP_Instance instance,
- [in] int32_t total,
- [in] PP_Bool final_result);
-
- /**
- * Updates the index of the currently selected search item.
- */
- void SelectedFindResultChanged(
- [in] PP_Instance instance,
- [in] int32_t index);
-};
-
diff --git a/chromium/ppapi/api/dev/ppb_graphics_2d_dev.idl b/chromium/ppapi/api/dev/ppb_graphics_2d_dev.idl
deleted file mode 100644
index 28a844416a6..00000000000
--- a/chromium/ppapi/api/dev/ppb_graphics_2d_dev.idl
+++ /dev/null
@@ -1,96 +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.
- */
-
-/* This file contains the <code>PPB_Graphics2D_Dev</code> interface. */
-
-[generate_thunk]
-
-label Chrome {
- M22 = 0.1,
- M32 = 0.2
-};
-
-/**
- * These options affect how the existing graphics context is displayed when a
- * plugin is resized.
- */
-[assert_size(4)]
-enum PP_Graphics2D_Dev_ResizeMode {
- /**
- * 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
-};
-
-/* PPB_Graphics2D_Dev interface */
-interface PPB_Graphics2D_Dev {
- /**
- * 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(
- [in] PP_Resource resource,
- [in] float_t 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_t GetScale(
- [in] 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.
- */
- [version=0.2]
- void SetOffset(
- [in] PP_Resource resource,
- [in] 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(
- [in] PP_Resource resource,
- [in] PP_Graphics2D_Dev_ResizeMode resize_mode);
-};
-
diff --git a/chromium/ppapi/api/dev/ppb_keyboard_input_event_dev.idl b/chromium/ppapi/api/dev/ppb_keyboard_input_event_dev.idl
deleted file mode 100644
index 0612b99411d..00000000000
--- a/chromium/ppapi/api/dev/ppb_keyboard_input_event_dev.idl
+++ /dev/null
@@ -1,60 +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.
- */
-
-/**
- * This file defines the <code>PPB_KeyboardInputEvent_Dev</code> interface,
- * which provides access to USB key codes that identify the physical key being
- * pressed.
- */
-
-label Chrome {
- M31 = 0.2
-};
-
-/**
- * The <code>PPB_KeyboardInputEvent_Dev</code> interface is an extension to the
- * PPB_KeyboardInputEvent</code> interface that provides
- */
-[macro="PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE"]
-interface PPB_KeyboardInputEvent_Dev {
- /**
- * 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([in] PP_Resource key_event,
- [in] 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([in] 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.
- */
- PP_Var GetCode([in] PP_Resource key_event);
-};
diff --git a/chromium/ppapi/api/dev/ppb_resource_array_dev.idl b/chromium/ppapi/api/dev/ppb_resource_array_dev.idl
deleted file mode 100644
index b7497b23735..00000000000
--- a/chromium/ppapi/api/dev/ppb_resource_array_dev.idl
+++ /dev/null
@@ -1,68 +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.
- */
-
-/**
- * This file defines the <code>PPB_ResourceArray_Dev</code> interface.
- */
-
-[generate_thunk]
-
-label Chrome {
- M18 = 0.1
-};
-
-/**
- * A resource array holds a list of resources and retains a reference to each of
- * them.
- */
-interface PPB_ResourceArray_Dev {
- /**
- * 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([in] PP_Instance instance,
- [in, size_as=size] PP_Resource[] elements,
- [in] 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([in] 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([in] 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(
- [in] PP_Resource resource_array,
- [in] uint32_t index);
-};
diff --git a/chromium/ppapi/api/dev/ppb_var_resource_dev.idl b/chromium/ppapi/api/dev/ppb_var_resource_dev.idl
deleted file mode 100644
index 2e5a6f307cc..00000000000
--- a/chromium/ppapi/api/dev/ppb_var_resource_dev.idl
+++ /dev/null
@@ -1,38 +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.
- */
-
-/**
- * This file defines the <code>PPB_VarResource</code> struct providing
- * a way to interact with resource vars.
- */
-
-label Chrome {
- M32 = 0.1
-};
-
-[macro="PPB_VAR_RESOURCE_DEV_INTERFACE"]
-interface PPB_VarResource_Dev {
- /**
- * 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([in] 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.
- */
- PP_Var VarFromResource([in] PP_Resource resource);
-};
diff --git a/chromium/ppapi/api/dev/ppb_video_capture_dev.idl b/chromium/ppapi/api/dev/ppb_video_capture_dev.idl
index 89379608624..a05374a4107 100644
--- a/chromium/ppapi/api/dev/ppb_video_capture_dev.idl
+++ b/chromium/ppapi/api/dev/ppb_video_capture_dev.idl
@@ -7,7 +7,6 @@
* This file defines the <code>PPB_VideoCapture_Dev</code> interface.
*/
label Chrome {
- M19 = 0.2,
M25 = 0.3
};
@@ -54,25 +53,6 @@ interface PPB_VideoCapture_Dev {
[in] PP_Resource video_capture);
/**
- * Enumerates video capture devices. Once the operation is completed
- * successfully, |devices| will be set to a PPB_ResourceArray_Dev resource,
- * which holds a list of PPB_DeviceRef_Dev resources.
- *
- * Please note that:
- * - this method ignores the previous value pointed to by |devices| (won't
- * release reference even if it is not 0);
- * - |devices| must be valid until |callback| is called, if the method
- * returns PP_OK_COMPLETIONPENDING;
- * - the ref count of the returned |devices| has already been increased by 1
- * for the caller.
- */
- [deprecate=0.3]
- int32_t EnumerateDevices(
- [in] PP_Resource video_capture,
- [out] PP_Resource devices,
- [in] PP_CompletionCallback callback);
-
- /**
* Enumerates video capture devices.
*
* @param[in] video_capture A <code>PP_Resource</code> corresponding to a
diff --git a/chromium/ppapi/api/extensions/dev/ppb_ext_socket_dev.idl b/chromium/ppapi/api/extensions/dev/ppb_ext_socket_dev.idl
deleted file mode 100644
index 9b0fc7b3aee..00000000000
--- a/chromium/ppapi/api/extensions/dev/ppb_ext_socket_dev.idl
+++ /dev/null
@@ -1,542 +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.
- */
-
-/**
- * This file defines the Pepper equivalent of the <code>chrome.socket</code>
- * extension API.
- */
-
-label Chrome {
- M28 = 0.1,
- M29 = 0.2
-};
-
-/**
- * A string <code>PP_Var</code> which has one of the following values:
- * - "tcp"
- * - "udp"
- */
-typedef PP_Var PP_Ext_Socket_SocketType_Dev;
-
-/**
- * A dictionary <code>PP_Var</code>.
- */
-typedef 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 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 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 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 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 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 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 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 PP_Var PP_Ext_Socket_NetworkInterface_Dev_Array;
-
-interface PPB_Ext_Socket_Dev {
- /**
- * 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(
- [in] PP_Instance instance,
- [in] PP_Ext_Socket_SocketType_Dev type,
- [in] PP_Ext_Socket_CreateOptions_Dev options,
- [out] PP_Ext_Socket_CreateInfo_Dev create_info,
- [in] 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(
- [in] PP_Instance instance,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var hostname,
- [in] PP_Var port,
- [out] PP_Var result,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var address,
- [in] PP_Var port,
- [out] PP_Var result,
- [in] 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(
- [in] PP_Instance instance,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var buffer_size,
- [out] PP_Ext_Socket_ReadInfo_Dev read_info,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var data,
- [out] PP_Ext_Socket_WriteInfo_Dev write_info,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var buffer_size,
- [out] PP_Ext_Socket_RecvFromInfo_Dev recv_from_info,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var data,
- [in] PP_Var address,
- [in] PP_Var port,
- [out] PP_Ext_Socket_WriteInfo_Dev write_info,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var address,
- [in] PP_Var port,
- [in] PP_Var backlog,
- [out] PP_Var result,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [out] PP_Ext_Socket_AcceptInfo_Dev accept_info,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var enable,
- [in] PP_Var delay,
- [out] PP_Var result,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var no_delay,
- [out] PP_Var result,
- [in] 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(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [out] PP_Ext_Socket_SocketInfo_Dev result,
- [in] 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(
- [in] PP_Instance instance,
- [out] PP_Ext_Socket_NetworkInterface_Dev_Array result,
- [in] 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>.
- */
- [version=0.2]
- int32_t JoinGroup(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var address,
- [out] PP_Var result,
- [in] 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>.
- */
- [version=0.2]
- int32_t LeaveGroup(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var address,
- [out] PP_Var result,
- [in] 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>.
- */
- [version=0.2]
- int32_t SetMulticastTimeToLive(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var ttl,
- [out] PP_Var result,
- [in] 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>.
- */
- [version=0.2]
- int32_t SetMulticastLoopbackMode(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [in] PP_Var enabled,
- [out] PP_Var result,
- [in] 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>.
- */
- [version=0.2]
- int32_t GetJoinedGroups(
- [in] PP_Instance instance,
- [in] PP_Var socket_id,
- [out] PP_Var groups,
- [in] PP_CompletionCallback callback);
-};
diff --git a/chromium/ppapi/api/pp_codecs.idl b/chromium/ppapi/api/pp_codecs.idl
new file mode 100644
index 00000000000..ecb61d02331
--- /dev/null
+++ b/chromium/ppapi/api/pp_codecs.idl
@@ -0,0 +1,57 @@
+/* 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.
+ */
+
+/**
+ * Video profiles.
+ */
+enum PP_VideoProfile {
+ 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
+};
+
+/**
+ * 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.
+ */
+ PP_Size texture_size;
+};
diff --git a/chromium/ppapi/api/pp_errors.idl b/chromium/ppapi/api/pp_errors.idl
index 1e4e8706aa2..2d958ecaeeb 100644
--- a/chromium/ppapi/api/pp_errors.idl
+++ b/chromium/ppapi/api/pp_errors.idl
@@ -85,6 +85,17 @@
* 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,
@@ -129,6 +140,7 @@
* thread.
*/
PP_ERROR_WRONG_THREAD = -52,
+
/**
* This value indicates that the connection was closed. For TCP sockets, it
* corresponds to a TCP FIN.
diff --git a/chromium/ppapi/api/pp_macros.idl b/chromium/ppapi/api/pp_macros.idl
index 999da67d381..9f02c274985 100644
--- a/chromium/ppapi/api/pp_macros.idl
+++ b/chromium/ppapi/api/pp_macros.idl
@@ -86,22 +86,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/api/pp_rect.idl b/chromium/ppapi/api/pp_rect.idl
index f342ab0e96a..b83e3cdb5a1 100644
--- a/chromium/ppapi/api/pp_rect.idl
+++ b/chromium/ppapi/api/pp_rect.idl
@@ -23,6 +23,21 @@ struct PP_Rect {
PP_Size size;
};
+/**
+ * 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.
+ */
+ PP_FloatPoint point;
+
+ /** This value represents the width and height of the rectangle. */
+ PP_FloatSize size;
+};
+
#inline c
/**
@@ -52,6 +67,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/api/pp_size.idl b/chromium/ppapi/api/pp_size.idl
index f289231c364..e320fadee61 100644
--- a/chromium/ppapi/api/pp_size.idl
+++ b/chromium/ppapi/api/pp_size.idl
@@ -18,6 +18,16 @@ struct PP_Size {
int32_t height;
};
+/**
+ * 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_t width;
+ /** This value represents the height of the rectangle. */
+ float_t height;
+};
+
#inline c
/**
* @addtogroup Functions
@@ -39,6 +49,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/api/pp_var.idl b/chromium/ppapi/api/pp_var.idl
index 425d99ba7bf..545585d14ea 100644
--- a/chromium/ppapi/api/pp_var.idl
+++ b/chromium/ppapi/api/pp_var.idl
@@ -45,15 +45,15 @@ enum PP_VarType {
* 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,
@@ -61,7 +61,7 @@ enum PP_VarType {
* 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,
@@ -69,7 +69,8 @@ enum PP_VarType {
* 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,
@@ -78,15 +79,25 @@ enum PP_VarType {
* 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
};
diff --git a/chromium/ppapi/api/ppb.idl b/chromium/ppapi/api/ppb.idl
index 465b7e56b32..76d80b31900 100644
--- a/chromium/ppapi/api/ppb.idl
+++ b/chromium/ppapi/api/ppb.idl
@@ -19,7 +19,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/api/ppb_audio.idl b/chromium/ppapi/api/ppb_audio.idl
index 7a996badd0b..d79ca97739e 100644
--- a/chromium/ppapi/api/ppb_audio.idl
+++ b/chromium/ppapi/api/ppb_audio.idl
@@ -33,7 +33,7 @@ typedef void PPB_Audio_Callback([out] mem_t 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/api/ppb_audio_buffer.idl b/chromium/ppapi/api/ppb_audio_buffer.idl
new file mode 100644
index 00000000000..8640f00dd1f
--- /dev/null
+++ b/chromium/ppapi/api/ppb_audio_buffer.idl
@@ -0,0 +1,140 @@
+/* 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.
+ */
+
+/**
+ * Defines the <code>PPB_AudioBuffer</code> interface.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ [channel=dev] M34 = 0.1,
+ M35 = 0.1
+};
+
+/**
+ * PP_AudioBuffer_SampleRate is an enumeration of the different audio sample
+ * rates.
+ */
+enum PP_AudioBuffer_SampleRate {
+ 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_SampleSize is an enumeration of the different audio sample
+ * sizes.
+ */
+enum PP_AudioBuffer_SampleSize {
+ PP_AUDIOBUFFER_SAMPLESIZE_UNKNOWN = 0,
+ PP_AUDIOBUFFER_SAMPLESIZE_16_BITS = 2
+};
+
+[version=0.1]
+interface PPB_AudioBuffer {
+ /**
+ * 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([in] 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.
+ */
+ [on_failure=0.0]
+ PP_TimeDelta GetTimestamp([in] 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([in] PP_Resource buffer, [in] 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.
+ */
+ [on_failure=PP_AUDIOBUFFER_SAMPLERATE_UNKNOWN]
+ PP_AudioBuffer_SampleRate GetSampleRate([in] 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.
+ */
+ [on_failure=PP_AUDIOBUFFER_SAMPLESIZE_UNKNOWN]
+ PP_AudioBuffer_SampleSize GetSampleSize([in] 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([in] 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([in] 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.
+ */
+ mem_t GetDataBuffer([in] 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([in] PP_Resource buffer);
+};
diff --git a/chromium/ppapi/api/ppb_audio_config.idl b/chromium/ppapi/api/ppb_audio_config.idl
index 1d64b4fb052..fd4cef4fe05 100644
--- a/chromium/ppapi/api/ppb_audio_config.idl
+++ b/chromium/ppapi/api/ppb_audio_config.idl
@@ -45,7 +45,7 @@ enum PP_AudioSampleRate {
* 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/api/ppb_compositor.idl b/chromium/ppapi/api/ppb_compositor.idl
new file mode 100644
index 00000000000..0fb62b38b70
--- /dev/null
+++ b/chromium/ppapi/api/ppb_compositor.idl
@@ -0,0 +1,131 @@
+/* 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.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ [channel=dev] M37 = 0.1
+};
+
+/**
+ * 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
+ */
+
+interface PPB_Compositor {
+ /**
+ * 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([in] 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([in] 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([in] 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([in] PP_Resource compositor,
+ [in] 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([in] PP_Resource compositor);
+};
diff --git a/chromium/ppapi/api/ppb_compositor_layer.idl b/chromium/ppapi/api/ppb_compositor_layer.idl
new file mode 100644
index 00000000000..a457ccc2a63
--- /dev/null
+++ b/chromium/ppapi/api/ppb_compositor_layer.idl
@@ -0,0 +1,222 @@
+/* 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.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ [channel=dev] M37 = 0.1
+};
+
+/**
+ * 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.
+ */
+enum PP_BlendMode {
+ /**
+ * 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
+};
+
+/**
+ * Defines the <code>PPB_CompositorLayer</code> interface. It is used by
+ * <code>PPB_Compositor</code>.
+ */
+interface PPB_CompositorLayer {
+ /**
+ * 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([in] 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([in] PP_Resource layer,
+ [in] float_t red,
+ [in] float_t green,
+ [in] float_t blue,
+ [in] float_t alpha,
+ [in] 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([in] PP_Resource layer,
+ [in] PP_Resource context,
+ [in] uint32_t texture,
+ [in] PP_Size size,
+ [in] 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([in] PP_Resource layer,
+ [in] PP_Resource image_data,
+ [in] PP_Size size,
+ [in] 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([in] PP_Resource layer,
+ [in] 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([in] PP_Resource layer,
+ [in] float_t[16] matrix);
+
+ /**
+ * 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([in] PP_Resource layer,
+ [in] float_t 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([in] PP_Resource layer,
+ [in] 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([in] PP_Resource layer,
+ [in] 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([in] PP_Resource layer,
+ [in] PP_Bool premult);
+};
diff --git a/chromium/ppapi/api/ppb_file_mapping.idl b/chromium/ppapi/api/ppb_file_mapping.idl
new file mode 100644
index 00000000000..7037955d343
--- /dev/null
+++ b/chromium/ppapi/api/ppb_file_mapping.idl
@@ -0,0 +1,131 @@
+/* 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 defines methods for mapping and unmapping files into and out of
+ * memory.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ [channel=dev] M34 = 0.1
+};
+
+/**
+ * The PP_FileMapProtection values indicate the permissions requested for the
+ * file mapping. These should be used in a uint32_t bitfield.
+ */
+[assert_size(4)]
+enum PP_FileMapProtection {
+ /** Requests read access to the mapped address. */
+ PP_FILEMAPPROTECTION_READ = 1u << 0,
+
+ /** Requests write access to the mapped address. */
+ PP_FILEMAPPROTECTION_WRITE = 1u << 1
+};
+
+/**
+ * The PP_FileMapFlags contain flag values for use with Map().
+ */
+[assert_size(4)]
+enum PP_FileMapFlags {
+ /**
+ * 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
+};
+
+/**
+ * PPB_FileMapping contains functions for mapping and unmapping files into and
+ * out of memory.
+ */
+[singleton]
+interface PPB_FileMapping {
+ /**
+ * 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([in] PP_Instance instance,
+ [in] PP_Resource file_io,
+ [in] int64_t length,
+ [in] uint32_t map_protection,
+ [in] uint32_t map_flags,
+ [in] int64_t offset,
+ [inout] mem_ptr_t address,
+ [in] 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([in] PP_Instance instance,
+ [in] mem_t address,
+ [in] int64_t length,
+ [in] 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.
+ */
+ [on_failure=0]
+ int64_t GetMapPageSize(PP_Instance instance);
+};
+
diff --git a/chromium/ppapi/api/ppb_file_ref.idl b/chromium/ppapi/api/ppb_file_ref.idl
index d9226471a9f..f3207e05bd2 100644
--- a/chromium/ppapi/api/ppb_file_ref.idl
+++ b/chromium/ppapi/api/ppb_file_ref.idl
@@ -10,7 +10,25 @@
label Chrome {
M14 = 1.0,
- M28 = 1.1
+ M28 = 1.1,
+ M34 = 1.2
+};
+
+/**
+ * The <code>PP_MakeDirectoryFlags</code> enum contains flags used to control
+ * behavior of <code>PPB_FileRef.MakeDirectory()</code>.
+ */
+enum PP_MakeDirectoryFlags {
+ 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
};
/**
@@ -105,17 +123,40 @@ interface PPB_FileRef {
* @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] 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>.
*/
+ [deprecate=1.2]
int32_t MakeDirectory([in] PP_Resource directory_ref,
[in] PP_Bool make_ancestors,
[in] PP_CompletionCallback callback);
/**
+ * 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_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>.
+ */
+ [version=1.2]
+ int32_t MakeDirectory([in] PP_Resource directory_ref,
+ [in] int32_t make_directory_flags,
+ [in] PP_CompletionCallback callback);
+
+ /**
* Touch() Updates time stamps for a file. You must have write access to the
* file if it exists in the external filesystem.
*
diff --git a/chromium/ppapi/api/ppb_input_event.idl b/chromium/ppapi/api/ppb_input_event.idl
index 2ed2e25ecb0..b9224fa584a 100644
--- a/chromium/ppapi/api/ppb_input_event.idl
+++ b/chromium/ppapi/api/ppb_input_event.idl
@@ -9,7 +9,8 @@
label Chrome {
M13 = 1.0,
- M14 = 1.1
+ M14 = 1.1,
+ M34 = 1.2
};
/**
@@ -312,12 +313,10 @@ interface PPB_InputEvent {
* 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
@@ -352,8 +351,8 @@ interface PPB_InputEvent {
* 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
@@ -733,8 +732,8 @@ interface PPB_KeyboardInputEvent {
* <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.
@@ -742,6 +741,7 @@ interface PPB_KeyboardInputEvent {
* @return A <code>PP_Resource</code> containing the new keyboard input
* event.
*/
+ [deprecate=1.2]
PP_Resource Create([in] PP_Instance instance,
[in] PP_InputEvent_Type type,
[in] PP_TimeTicks time_stamp,
@@ -750,6 +750,45 @@ interface PPB_KeyboardInputEvent {
[in] PP_Var character_text);
/**
+ * Creates a keyboard input event with the given parameters. Normally you
+ * will get a keyboard event passed through the HandleInputEvent and will not
+ * need to create them, but some applications may want to create their own
+ * for internal use. The type must be one of the keyboard event types.
+ *
+ * @param[in] instance The instance for which this event occurred.
+ *
+ * @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of
+ * input event.
+ *
+ * @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
+ * <code>PP_InputEvent_Modifier</code> flags.
+ *
+ * @param[in] key_code This value reflects the DOM KeyboardEvent
+ * <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.
+ */
+ [version=1.2]
+ PP_Resource Create([in] PP_Instance instance,
+ [in] PP_InputEvent_Type type,
+ [in] PP_TimeTicks time_stamp,
+ [in] uint32_t modifiers,
+ [in] uint32_t key_code,
+ [in] PP_Var character_text,
+ [in] PP_Var code);
+
+ /**
* IsKeyboardInputEvent() determines if a resource is a keyboard event.
*
* @param[in] resource A <code>PP_Resource</code> corresponding to an event.
@@ -781,6 +820,18 @@ interface PPB_KeyboardInputEvent {
* undefined var.
*/
PP_Var GetCharacterText([in] 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.
+ */
+ [version=1.2]
+ PP_Var GetCode([in] PP_Resource key_event);
};
[assert_size(4)]
diff --git a/chromium/ppapi/api/ppb_media_stream_audio_track.idl b/chromium/ppapi/api/ppb_media_stream_audio_track.idl
new file mode 100644
index 00000000000..4ffa9461aef
--- /dev/null
+++ b/chromium/ppapi/api/ppb_media_stream_audio_track.idl
@@ -0,0 +1,201 @@
+/* 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.
+ */
+
+/**
+ * Defines the <code>PPB_MediaStreamAudioTrack</code> interface. Used for
+ * receiving audio samples from a MediaStream audio track in the browser.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ [channel=dev] M34 = 0.1,
+ M35 = 0.1
+};
+
+/**
+ * This enumeration contains audio track attributes which are used by
+ * <code>Configure()</code>.
+ */
+enum PP_MediaStreamAudioTrack_Attrib {
+ /**
+ * 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
+};
+
+[version=0.1]
+interface PPB_MediaStreamAudioTrack {
+ /**
+ * 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([in] 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([in] PP_Resource audio_track,
+ [in] int32_t[] attrib_list,
+ [in] 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([in] PP_Resource audio_track,
+ [in] PP_MediaStreamAudioTrack_Attrib attrib,
+ [out] 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.
+ */
+ PP_Var GetId([in] 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.
+ */
+ [on_failure=PP_TRUE]
+ PP_Bool HasEnded([in] 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([in] PP_Resource audio_track,
+ [out] PP_Resource buffer,
+ [in] 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([in] PP_Resource audio_track,
+ [in] 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([in] PP_Resource audio_track);
+};
+
diff --git a/chromium/ppapi/api/ppb_media_stream_video_track.idl b/chromium/ppapi/api/ppb_media_stream_video_track.idl
new file mode 100644
index 00000000000..2cf85304c38
--- /dev/null
+++ b/chromium/ppapi/api/ppb_media_stream_video_track.idl
@@ -0,0 +1,247 @@
+/* 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.
+ */
+
+/**
+ * Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for
+ * receiving video frames from a MediaStream video track in the browser.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ [channel=dev] M34 = 0.1,
+ M35 = 0.1,
+ [channel=dev] M36 = 1.0
+};
+
+/**
+ * This enumeration contains video track attributes which are used by
+ * <code>Configure()</code>.
+ */
+enum PP_MediaStreamVideoTrack_Attrib {
+ /**
+ * 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
+};
+
+[version=0.1]
+interface PPB_MediaStreamVideoTrack {
+ /**
+ * 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.
+ */
+ [version=1.0]
+ PP_Resource Create([in] 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([in] 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([in] PP_Resource video_track,
+ [in] int32_t[] attrib_list,
+ [in] 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([in] PP_Resource video_track,
+ [in] PP_MediaStreamVideoTrack_Attrib attrib,
+ [out] 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.
+ */
+ PP_Var GetId([in] 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.
+ */
+ [on_failure=PP_TRUE]
+ PP_Bool HasEnded([in] 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([in] PP_Resource video_track,
+ [out] PP_Resource frame,
+ [in] 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([in] PP_Resource video_track,
+ [in] 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([in] 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.
+ */
+ [version=1.0]
+ int32_t GetEmptyFrame([in] PP_Resource video_track,
+ [out] PP_Resource frame,
+ [in] 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.
+ */
+ [version=1.0]
+ int32_t PutFrame([in] PP_Resource video_track, [in] PP_Resource frame);
+};
+
diff --git a/chromium/ppapi/api/ppb_message_loop.idl b/chromium/ppapi/api/ppb_message_loop.idl
index 0adc0b34f73..73ad14db836 100644
--- a/chromium/ppapi/api/ppb_message_loop.idl
+++ b/chromium/ppapi/api/ppb_message_loop.idl
@@ -58,8 +58,8 @@ label Chrome {
* 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/api/ppb_messaging.idl b/chromium/ppapi/api/ppb_messaging.idl
index 0f9a3aa8c2b..5100f5f5ed8 100644
--- a/chromium/ppapi/api/ppb_messaging.idl
+++ b/chromium/ppapi/api/ppb_messaging.idl
@@ -12,7 +12,8 @@
[generate_thunk]
label Chrome {
- M14 = 1.0
+ M14 = 1.0,
+ [channel=dev] M37 = 1.1
};
/**
@@ -81,6 +82,65 @@ interface PPB_Messaging {
*
* The browser will pop-up an alert saying "Hello world!"
*/
+ [version=1.0]
void PostMessage([in] PP_Instance instance, [in] 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.
+ */
+ [version=1.1]
+ int32_t RegisterMessageHandler([in] PP_Instance instance,
+ [inout] mem_t user_data,
+ [in] PPP_MessageHandler handler,
+ [in] 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.
+ */
+ [version=1.1]
+ void UnregisterMessageHandler([in] PP_Instance instance);
};
diff --git a/chromium/ppapi/api/ppb_var.idl b/chromium/ppapi/api/ppb_var.idl
index 5bc613102ac..cc12b1bb3b7 100644
--- a/chromium/ppapi/api/ppb_var.idl
+++ b/chromium/ppapi/api/ppb_var.idl
@@ -9,7 +9,8 @@
label Chrome {
M14 = 1.0,
- M18 = 1.1
+ M18 = 1.1,
+ M34 = 1.2
};
/**
@@ -28,9 +29,13 @@ interface PPB_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.
*/
@@ -45,7 +50,7 @@ interface PPB_Var {
*
* 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
+ * "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
@@ -73,8 +78,8 @@ interface PPB_Var {
*
* 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
@@ -112,5 +117,31 @@ interface PPB_Var {
*/
[version=1.0]
str_t VarToUtf8([in] PP_Var var, [out] 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.
+ */
+ [version=1.2]
+ PP_Resource VarToResource([in] 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.
+ */
+ [version=1.2]
+ PP_Var VarFromResource([in] PP_Resource resource);
};
diff --git a/chromium/ppapi/api/ppb_video_decoder.idl b/chromium/ppapi/api/ppb_video_decoder.idl
new file mode 100644
index 00000000000..b450633b818
--- /dev/null
+++ b/chromium/ppapi/api/ppb_video_decoder.idl
@@ -0,0 +1,216 @@
+/* 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.
+ */
+
+/**
+ * This file defines the <code>PPB_VideoDecoder</code> interface.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ [channel=dev] M36 = 0.1
+};
+
+/**
+ * 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.
+ */
+interface PPB_VideoDecoder {
+ /**
+ * 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(
+ [in] 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(
+ [in] 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(
+ [in] PP_Resource video_decoder,
+ [in] PP_Resource graphics3d_context,
+ [in] PP_VideoProfile profile,
+ [in] PP_Bool allow_software_fallback,
+ [in] 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(
+ [in] PP_Resource video_decoder,
+ [in] uint32_t decode_id,
+ [in] uint32_t size,
+ [in] mem_t buffer,
+ [in] 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(
+ [in] PP_Resource video_decoder,
+ [out] PP_VideoPicture picture,
+ [in] 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(
+ [in] PP_Resource video_decoder,
+ [in] 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(
+ [in] PP_Resource video_decoder,
+ [in] 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(
+ [in] PP_Resource video_decoder,
+ [in] PP_CompletionCallback callback);
+};
diff --git a/chromium/ppapi/api/ppb_video_frame.idl b/chromium/ppapi/api/ppb_video_frame.idl
new file mode 100644
index 00000000000..57378925aa8
--- /dev/null
+++ b/chromium/ppapi/api/ppb_video_frame.idl
@@ -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.
+ */
+
+/**
+ * Defines the <code>PPB_VideoFrame</code> interface.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ [channel=dev] M34 = 0.1,
+ M35 = 0.1
+};
+
+enum PP_VideoFrame_Format {
+ /**
+ * 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
+};
+
+[version=0.1]
+interface PPB_VideoFrame {
+ /**
+ * 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([in] 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.
+ */
+ [on_failure=0.0]
+ PP_TimeDelta GetTimestamp([in] 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([in] PP_Resource frame, [in] 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.
+ */
+ [on_failure=PP_VIDEOFRAME_FORMAT_UNKNOWN]
+ PP_VideoFrame_Format GetFormat([in] 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([in] PP_Resource frame, [out] 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.
+ */
+ mem_t GetDataBuffer([in] 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([in] PP_Resource frame);
+};
diff --git a/chromium/ppapi/api/ppb_view.idl b/chromium/ppapi/api/ppb_view.idl
index a01c5e828d3..e0e0cce075b 100644
--- a/chromium/ppapi/api/ppb_view.idl
+++ b/chromium/ppapi/api/ppb_view.idl
@@ -12,7 +12,8 @@
label Chrome {
M18 = 1.0,
- M28 = 1.1
+ M28 = 1.1,
+ [channel=dev] M37 = 1.2
};
/**
@@ -88,7 +89,7 @@ interface PPB_View {
* and IsPageVisible() (whether the page is visible to the user).
*
* @param resource A <code>PP_Resource</code> corresponding to a
- * <code>PPB_View</code> resource.
+ * <code>PPB_View</code> resource.
*
* @return <code>PP_TRUE</code> if the instance might be visible to the
* user, <code>PP_FALSE</code> if it is definitely not visible.
@@ -108,7 +109,7 @@ interface PPB_View {
* not visible.
*
* @param resource A <code>PP_Resource</code> corresponding to a
- * <code>PPB_View</code> resource.
+ * <code>PPB_View</code> resource.
*
* @return <code>PP_TRUE</code> if the instance is plausibly visible to the
* user, <code>PP_FALSE</code> if it is definitely not visible.
@@ -151,7 +152,7 @@ interface PPB_View {
* the visual distraction when this happens.
*
* @param resource A <code>PP_Resource</code> corresponding to a
- * <code>PPB_View</code> resource.
+ * <code>PPB_View</code> resource.
*
* @param clip Output argument receiving the clip rect on success.
*
@@ -193,5 +194,22 @@ interface PPB_View {
*/
[version=1.1]
float_t GetCSSScale([in] 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.
+ */
+ [version=1.2]
+ PP_Bool GetScrollOffset([in] PP_Resource resource,
+ [out] PP_Point offset);
};
diff --git a/chromium/ppapi/api/ppp_input_event.idl b/chromium/ppapi/api/ppp_input_event.idl
index a7efb5b6156..97285c28420 100644
--- a/chromium/ppapi/api/ppp_input_event.idl
+++ b/chromium/ppapi/api/ppp_input_event.idl
@@ -20,10 +20,10 @@ interface PPP_InputEvent {
* 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/api/ppp_message_handler.idl b/chromium/ppapi/api/ppp_message_handler.idl
new file mode 100644
index 00000000000..675b1a3cf7b
--- /dev/null
+++ b/chromium/ppapi/api/ppp_message_handler.idl
@@ -0,0 +1,70 @@
+/* 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 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().
+ */
+
+label Chrome {
+ [channel=none] M37 = 0.1
+};
+
+/**
+ * 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.
+ */
+[no_interface_string]
+interface PPP_MessageHandler {
+ /**
+ * 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([in] PP_Instance instance,
+ [inout] mem_t user_data,
+ [in] 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.
+ */
+ PP_Var HandleBlockingMessage([in] PP_Instance instance,
+ [inout] mem_t user_data,
+ [in] 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([in] PP_Instance instance, [inout] mem_t user_data);
+};
+
diff --git a/chromium/ppapi/api/private/finish_writing_these/ppb_pdf.idl b/chromium/ppapi/api/private/finish_writing_these/ppb_pdf.idl
index d586f09c38f..20e077f346a 100644
--- a/chromium/ppapi/api/private/finish_writing_these/ppb_pdf.idl
+++ b/chromium/ppapi/api/private/finish_writing_these/ppb_pdf.idl
@@ -150,4 +150,16 @@ interface PPB_PDF_0_1 {
/* Returns PP_TRUE if the plugin is out of process. */
PP_Bool IsOutOfProcess(
[in] PP_Instance instance);
+
+ /* Sets the selected text of the plugin. If |selected_text| is empty, then no
+ * text is selected. */
+ void SetSelectedText(
+ [in] PP_Instance instance,
+ [in] str_t selected_text);
+
+ /* Sets the link under the cursor. If |url| is empty, then no link is under
+ * the cursor. */
+ void SetLinkUnderCursor(
+ [in] PP_Instance instance,
+ [in] str_t url);
};
diff --git a/chromium/ppapi/api/private/pp_content_decryptor.idl b/chromium/ppapi/api/private/pp_content_decryptor.idl
index 41a39974083..4493c3eab7a 100644
--- a/chromium/ppapi/api/private/pp_content_decryptor.idl
+++ b/chromium/ppapi/api/private/pp_content_decryptor.idl
@@ -81,7 +81,7 @@ struct PP_DecryptSubsampleDescription {
* The <code>PP_EncryptedBlockInfo</code> struct contains all the information
* needed to decrypt an encrypted block.
*/
-[assert_size(248)]
+[assert_size(240)]
struct PP_EncryptedBlockInfo {
/**
* Information needed by the client to track the block to be decrypted.
@@ -94,11 +94,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.
@@ -121,12 +116,6 @@ struct PP_EncryptedBlockInfo {
*/
PP_DecryptSubsampleDescription[16] subsamples;
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;
};
/**
@@ -337,7 +326,8 @@ struct PP_AudioDecoderConfig {
enum PP_VideoCodec {
PP_VIDEOCODEC_UNKNOWN = 0,
PP_VIDEOCODEC_VP8 = 1,
- PP_VIDEOCODEC_H264 = 2
+ PP_VIDEOCODEC_H264 = 2,
+ PP_VIDEOCODEC_VP9 = 3
};
/**
@@ -348,7 +338,7 @@ enum PP_VideoCodec {
[assert_size(4)]
enum PP_VideoCodecProfile {
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,
@@ -409,3 +399,26 @@ enum PP_DecryptorStreamType {
PP_DECRYPTORSTREAMTYPE_AUDIO = 0,
PP_DECRYPTORSTREAMTYPE_VIDEO = 1
};
+
+/**
+ * <code>PP_SessionType</code> contains session type constants.
+ */
+[assert_size(4)]
+enum PP_SessionType {
+ PP_SESSIONTYPE_TEMPORARY = 0,
+ PP_SESSIONTYPE_PERSISTENT = 1
+};
+
+/**
+ * <code>PP_CdmExceptionCode</code> contains exception code constants.
+ */
+[assert_size(4)]
+enum PP_CdmExceptionCode {
+ 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
+};
diff --git a/chromium/ppapi/api/private/ppb_content_decryptor_private.idl b/chromium/ppapi/api/private/ppb_content_decryptor_private.idl
index cade7245984..e4dfd4f1420 100644
--- a/chromium/ppapi/api/private/ppb_content_decryptor_private.idl
+++ b/chromium/ppapi/api/private/ppb_content_decryptor_private.idl
@@ -12,7 +12,7 @@
[generate_thunk]
label Chrome {
- M33 = 0.9
+ M36 = 0.12
};
/**
@@ -24,22 +24,48 @@ label Chrome {
*/
interface PPB_ContentDecryptor_Private {
/**
- * 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(
+ [in] PP_Instance instance,
+ [in] uint32_t promise_id);
+
+ /**
+ * A promise has been resolved by the CDM.
*
- * @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.
+ * @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 session's ID attribute.
*/
- void SessionCreated(
+ void PromiseResolvedWithSession(
[in] PP_Instance instance,
- [in] uint32_t session_id,
+ [in] uint32_t promise_id,
[in] 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 PromiseRejected(
+ [in] PP_Instance instance,
+ [in] uint32_t promise_id,
+ [in] PP_CdmExceptionCode exception_code,
+ [in] uint32_t system_code,
+ [in] 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.
*
@@ -53,8 +79,9 @@ interface PPB_ContentDecryptor_Private {
* 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.
@@ -65,7 +92,7 @@ interface PPB_ContentDecryptor_Private {
*/
void SessionMessage(
[in] PP_Instance instance,
- [in] uint32_t session_id,
+ [in] PP_Var web_session_id,
[in] PP_Var message,
[in] PP_Var destination_url);
@@ -81,11 +108,13 @@ interface PPB_ContentDecryptor_Private {
* 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(
[in] PP_Instance instance,
- [in] uint32_t session_id);
+ [in] PP_Var web_session_id);
/**
* The session has been closed as the result of a call to the
@@ -93,28 +122,36 @@ interface PPB_ContentDecryptor_Private {
* <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(
[in] PP_Instance instance,
- [in] uint32_t session_id);
+ [in] 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(
[in] PP_Instance instance,
- [in] uint32_t session_id,
- [in] int32_t media_error,
- [in] int32_t system_code);
+ [in] PP_Var web_session_id,
+ [in] PP_CdmExceptionCode exception_code,
+ [in] uint32_t system_code,
+ [in] PP_Var error_description);
/**
* Called after the <code>Decrypt()</code> method on the
diff --git a/chromium/ppapi/api/private/ppb_display_color_profile_private.idl b/chromium/ppapi/api/private/ppb_display_color_profile_private.idl
new file mode 100644
index 00000000000..41e48416591
--- /dev/null
+++ b/chromium/ppapi/api/private/ppb_display_color_profile_private.idl
@@ -0,0 +1,97 @@
+/* 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 defines the <code>PPB_DisplayColorProfile</code> struct used for
+ * getting the color profile of the display.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ M33 = 0.1
+};
+
+/**
+ * <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
+ */
+interface PPB_DisplayColorProfile_Private {
+ /**
+ * 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([in] 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([in] 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([in] PP_Resource display_color_profile_res,
+ [in] PP_ArrayOutput color_profile,
+ [in] 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(
+ [in] PP_Resource display_color_profile_res,
+ [in] PP_CompletionCallback callback);
+};
diff --git a/chromium/ppapi/api/private/ppb_find_private.idl b/chromium/ppapi/api/private/ppb_find_private.idl
new file mode 100644
index 00000000000..e6f7cfa7283
--- /dev/null
+++ b/chromium/ppapi/api/private/ppb_find_private.idl
@@ -0,0 +1,66 @@
+/* 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 defines the <code>PPB_Find_Private</code> interface.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ M14 = 0.3
+};
+
+/**
+ * This is a private interface for doing browser Find in the PDF plugin.
+ */
+interface PPB_Find_Private {
+ /**
+ * 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(
+ [in] 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(
+ [in] PP_Instance instance,
+ [in] int32_t total,
+ [in] PP_Bool final_result);
+
+ /**
+ * Updates the index of the currently selected search item.
+ */
+ void SelectedFindResultChanged(
+ [in] PP_Instance instance,
+ [in] int32_t index);
+
+ /**
+ * Updates the tickmarks on the scrollbar for the find request. |tickmarks|
+ * contains |count| PP_Rects indicating the tickmark ranges.
+ */
+ void SetTickmarks(
+ [in] PP_Instance instance,
+ [in, size_as=count] PP_Rect[] tickmarks,
+ [in] uint32_t count);
+};
+
diff --git a/chromium/ppapi/api/private/ppb_flash_clipboard.idl b/chromium/ppapi/api/private/ppb_flash_clipboard.idl
index 5a973182a07..d2fef48a074 100644
--- a/chromium/ppapi/api/private/ppb_flash_clipboard.idl
+++ b/chromium/ppapi/api/private/ppb_flash_clipboard.idl
@@ -10,7 +10,8 @@
label Chrome {
M19 = 4.0,
- M24 = 5.0
+ M24 = 5.0,
+ M34 = 5.1
};
/**
@@ -142,4 +143,15 @@ interface PPB_Flash_Clipboard {
[in] uint32_t data_item_count,
[in, size_is(data_item_count)] uint32_t[] formats,
[in, size_is(data_item_count)] 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.
+ */
+ [version=5.1]
+ PP_Bool GetSequenceNumber([in] PP_Instance instance_id,
+ [in] PP_Flash_Clipboard_Type clipboard_type,
+ [out] uint64_t sequence_number);
};
diff --git a/chromium/ppapi/api/private/ppb_flash_drm.idl b/chromium/ppapi/api/private/ppb_flash_drm.idl
index c6f6efff5ae..a5da9673d1b 100644
--- a/chromium/ppapi/api/private/ppb_flash_drm.idl
+++ b/chromium/ppapi/api/private/ppb_flash_drm.idl
@@ -34,9 +34,11 @@ interface PPB_Flash_DRM {
[in] 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([in] PP_Resource drm,
[out] int64_t hmonitor);
diff --git a/chromium/ppapi/api/private/ppb_input_event_private.idl b/chromium/ppapi/api/private/ppb_input_event_private.idl
new file mode 100644
index 00000000000..f06804f613e
--- /dev/null
+++ b/chromium/ppapi/api/private/ppb_input_event_private.idl
@@ -0,0 +1,54 @@
+/* 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 defines the PPB_InputEvent_Private interfaces.
+ */
+
+label Chrome {
+ M37 = 0.1
+};
+
+/**
+ * The <code>PPB_InputEvent_Private</code> interface contains pointers to several
+ * functions related to generic input events on the browser.
+ */
+
+interface PPB_InputEvent_Private {
+ /**
+ * 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([in] PP_Resource event,
+ [in] 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([in] PP_Instance instance);
+};
diff --git a/chromium/ppapi/api/private/ppb_nacl_private.idl b/chromium/ppapi/api/private/ppb_nacl_private.idl
index 4e215d7fa89..9a94214b0f6 100644
--- a/chromium/ppapi/api/private/ppb_nacl_private.idl
+++ b/chromium/ppapi/api/private/ppb_nacl_private.idl
@@ -15,13 +15,93 @@ label Chrome {
#include "ppapi/c/private/ppb_instance_private.h"
#endinl
-/** 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.
+ */
enum PP_NaClError {
- /**
- * The manifest program element does not contain a program usable on the
- * user's architecture
- */
- PP_NACL_MANIFEST_MISSING_ARCH = 0
+ 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_COMMUNICATION = 23, */
+ 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
+ numbers need to be kept consistent. */
+ 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
+ histograms. */
+ PP_NACL_ERROR_MAX
};
/** Event types that NaCl may use when reporting load progress or errors. */
@@ -35,6 +115,67 @@ enum PP_NaClEventType {
PP_NACL_EVENT_CRASH
};
+enum PP_UrlSchemeType {
+ PP_SCHEME_CHROME_EXTENSION,
+ PP_SCHEME_DATA,
+ PP_SCHEME_OTHER
+};
+
+enum PP_NaClReadyState {
+ /* 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
+ interaction with the page. */
+ PP_NACL_READY_STATE_DONE = 4
+};
+
+struct PP_PNaClOptions {
+ PP_Bool translate;
+ PP_Bool is_debug;
+ int32_t opt_level;
+};
+
+/* Callback invoked upon completion of PPP_ManifestService::OpenResource(). */
+typedef void PP_OpenResourceCompletionCallback([inout] mem_t user_data,
+ [in] PP_FileHandle file_handle);
+
+/* 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.
+ */
+interface PPP_ManifestService {
+ /* Called when ManifestService should be destructed. */
+ PP_Bool Quit([inout] mem_t user_data);
+
+ /* Called when PPAPI initialization in the NaCl plugin is finished. */
+ PP_Bool StartupInitializationComplete([inout] mem_t 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([inout] mem_t user_data,
+ [in] str_t entry_key,
+ [in] PP_OpenResourceCompletionCallback callback,
+ [inout] mem_t callback_user_data);
+};
+
+/* 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;
+};
+
/* PPB_NaCl_Private */
interface PPB_NaCl_Private {
/* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success
@@ -46,6 +187,8 @@ interface PPB_NaCl_Private {
* 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
@@ -54,26 +197,25 @@ interface PPB_NaCl_Private {
* the nexe contribute to crash throttling statisics and whether nexe starts
* are throttled by crash throttling.
*/
- PP_ExternalPluginResult LaunchSelLdr([in] PP_Instance instance,
- [in] str_t alleged_url,
- [in] PP_Bool uses_irt,
- [in] PP_Bool uses_ppapi,
- [in] PP_Bool enable_ppapi_dev,
- [in] PP_Bool enable_dyncode_syscalls,
- [in] PP_Bool enable_exception_handling,
- [in] PP_Bool enable_crash_throttling,
- [out] mem_t imc_handle,
- [out] PP_Var error_message);
+ void LaunchSelLdr([in] PP_Instance instance,
+ [in] PP_Bool main_service_runtime,
+ [in] str_t alleged_url,
+ [in] PP_Bool uses_irt,
+ [in] PP_Bool uses_ppapi,
+ [in] PP_Bool uses_nonsfi_mode,
+ [in] PP_Bool enable_ppapi_dev,
+ [in] PP_Bool enable_dyncode_syscalls,
+ [in] PP_Bool enable_exception_handling,
+ [in] PP_Bool enable_crash_throttling,
+ [in] PPP_ManifestService manifest_service_interface,
+ [inout] mem_t manifest_service_user_data,
+ [out] mem_t imc_handle,
+ [in] 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.
+ * browser.
*/
- PP_ExternalPluginResult StartPpapiProxy(PP_Instance instance);
+ 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.
@@ -98,10 +240,10 @@ interface PPB_NaCl_Private {
[in] uint32_t desired_access,
[in] 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([in] str_t filename);
+ PP_FileHandle GetReadonlyPnaclFd([in] str_t url);
/* This creates a temporary file that will be deleted by the time
* the last handle is closed (or earlier on POSIX systems), and
@@ -109,27 +251,30 @@ interface PPB_NaCl_Private {
*/
PP_FileHandle CreateTemporaryFile([in] PP_Instance instance);
+ /* Return the number of processors in the system as reported by the OS */
+ int32_t GetNumberOfProcessors();
+
+ /* Return whether the non-SFI mode is enabled. */
+ PP_Bool IsNonSFIModeEnabled();
+
/* 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([in] PP_Instance instance,
[in] str_t pexe_url,
[in] uint32_t abi_version,
[in] uint32_t opt_level,
- [in] str_t last_modified,
- [in] str_t etag,
- [in] PP_Bool has_no_store_header,
+ [in] str_t headers,
+ [in] str_t extra_flags,
[out] PP_Bool is_hit,
[out] PP_FileHandle nexe_handle,
[in] PP_CompletionCallback callback);
@@ -144,36 +289,156 @@ interface PPB_NaCl_Private {
* the plugin.)
*/
void ReportTranslationFinished([in] PP_Instance instance,
- [in] PP_Bool success);
-
- /* Display a UI message to the user. */
- PP_ExternalPluginResult ReportNaClError([in] PP_Instance instance,
- [in] 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([in] PP_Instance instance,
- [in] str_t file_url,
- [out] uint64_t file_token_lo,
- [out] uint64_t file_token_hi);
-
+ [in] PP_Bool success,
+ [in] int32_t opt_level,
+ [in] int64_t pexe_size,
+ [in] int64_t compile_time_us,
+ [in] int64_t total_time_us);
/* Dispatch a progress event on the DOM element where the given instance is
* embedded.
*/
void DispatchEvent([in] PP_Instance instance,
[in] PP_NaClEventType event_type,
- [in] PP_Var resource_url,
+ [in] str_t resource_url,
[in] PP_Bool length_is_computable,
[in] uint64_t loaded_bytes,
[in] 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([in] PP_Instance instance,
+ [in] str_t url,
+ [in] uint64_t loaded_bytes,
+ [in] uint64_t total_bytes);
+
+ /* Report an error that occured while attempting to load a nexe. */
+ void ReportLoadError([in] PP_Instance instance,
+ [in] PP_NaClError error,
+ [in] str_t error_message);
+
+ /* Reports that loading a nexe was aborted. */
+ void ReportLoadAbort([in] PP_Instance instance);
+
+ /* Reports that the nexe has crashed. */
+ void NexeDidCrash([in] PP_Instance instance,
+ [in] str_t crash_log);
+
+ /* Performs internal setup when an instance is created. */
+ void InstanceCreated([in] PP_Instance instance);
+
+ /* Performs internal cleanup when an instance is destroyed. */
+ void InstanceDestroyed([in] 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([in] str_t alleged_nmf_url);
+
+ /* Returns the kind of SFI sandbox implemented by NaCl on this
+ * platform.
+ */
+ str_t GetSandboxArch();
+
+ /* Logs the message to the console. */
+ void LogToConsole([in] PP_Instance instance,
+ [in] str_t message);
+
+ /* Returns the NaCl readiness status for this instance. */
+ PP_NaClReadyState GetNaClReadyState([in] PP_Instance instance);
+
+ /* Returns the exit status of the plugin process. */
+ int32_t GetExitStatus([in] PP_Instance instance);
+
+ /* Sets the exit status of the plugin process. */
+ void SetExitStatus([in] PP_Instance instance,
+ [in] int32_t exit_status);
+
+ /* Logs the message via VLOG. */
+ void Vlog([in] str_t message);
+
+ /* Initializes internal state for a NaCl plugin. */
+ void InitializePlugin([in] PP_Instance instance,
+ [in] uint32_t argc,
+ [in, size_as=argc] str_t[] argn,
+ [in, size_as=argv] str_t[] argv);
+
+ /* Returns the size of the nexe. */
+ int64_t GetNexeSize([in] PP_Instance instance);
+
+ /* Requests the NaCl manifest specified in the plugin arguments. */
+ void RequestNaClManifest([in] PP_Instance instance,
+ [in] PP_CompletionCallback callback);
+
+ PP_Var GetManifestBaseURL([in] 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([in] PP_Instance instance,
+ [in] str_t program_url);
+
+ PP_Bool DevInterfacesEnabled([in] PP_Instance instance);
+
+ PP_Bool GetManifestProgramURL([in] PP_Instance instance,
+ [out] PP_Var full_url,
+ [out] PP_PNaClOptions pnacl_options,
+ [out] PP_Bool uses_nonsfi_mode);
+
+ PP_Bool ManifestResolveKey([in] PP_Instance instance,
+ [in] PP_Bool helper_process,
+ [in] str_t key,
+ [out] PP_Var full_url,
+ [out] 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([in] PP_Instance instance,
+ [in] str_t filename,
+ [out] PP_Var llc_tool_name,
+ [out] 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
+ PP_Var GetCpuFeatureAttrs();
+
+ /* Posts a message to the JavaScript object for the given instance.
+ * This method may be called on any thread.
+ */
+ void PostMessageToJavaScript([in] PP_Instance instance,
+ [in] str_t 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([in] PP_Instance instance,
+ [in] str_t url,
+ [out] PP_NaClFileInfo file_info,
+ [in] PP_CompletionCallback callback);
+
+ /* Downloads a non-nexe file specified in the manifest, and sets |file_info|
+ * to corresponding information about the file. */
+ void DownloadFile([in] PP_Instance instance,
+ [in] str_t url,
+ [out] PP_NaClFileInfo file_info,
+ [in] 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([in] PP_Instance instance,
+ [in] int32_t load_status,
+ [in] int32_t max_status);
+
+ /* Logs time taken by an operation to UMA histograms.
+ * This function is safe to call on any thread.
*/
- void SetReadOnlyProperty([in] PP_Instance instance,
- [in] PP_Var key,
- [in] PP_Var value);
+ void LogTranslateTime([in] str_t histogram_name,
+ [in] int64_t time_us);
};
diff --git a/chromium/ppapi/api/private/ppb_uma_private.idl b/chromium/ppapi/api/private/ppb_uma_private.idl
index cdb39080fa2..2d9b950fbba 100644
--- a/chromium/ppapi/api/private/ppb_uma_private.idl
+++ b/chromium/ppapi/api/private/ppb_uma_private.idl
@@ -6,8 +6,11 @@
/**
* This file defines the <code>PPB_UMA_Private</code> interface.
*/
+
+[generate_thunk,thunk_include="ppapi/thunk/ppb_uma_singleton_api.h"]
+
label Chrome {
- M18 = 0.1
+ M35 = 0.3
};
/**
@@ -19,7 +22,9 @@ interface PPB_UMA_Private {
* sample given in milliseconds in the histogram given by |name|, possibly
* creating the histogram if it does not exist.
*/
- void HistogramCustomTimes([in] PP_Var name,
+ [singleton,api=PPB_UMA_Singleton_API]
+ void HistogramCustomTimes([in] PP_Instance instance,
+ [in] PP_Var name,
[in] int64_t sample,
[in] int64_t min,
[in] int64_t max,
@@ -30,7 +35,9 @@ interface PPB_UMA_Private {
* in the histogram given by |name|, possibly creating the histogram if it
* does not exist.
*/
- void HistogramCustomCounts([in] PP_Var name,
+ [singleton,api=PPB_UMA_Singleton_API]
+ void HistogramCustomCounts([in] PP_Instance instance,
+ [in] PP_Var name,
[in] int32_t sample,
[in] int32_t min,
[in] int32_t max,
@@ -42,7 +49,19 @@ interface PPB_UMA_Private {
* does not exist. The sample represents a value in an enumeration bounded
* by |boundary_value|, that is, sample < boundary_value always.
*/
- void HistogramEnumeration([in] PP_Var name,
+ [singleton,api=PPB_UMA_Singleton_API]
+ void HistogramEnumeration([in] PP_Instance instance,
+ [in] PP_Var name,
[in] int32_t sample,
[in] 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.
+ */
+ [singleton,api=PPB_UMA_Singleton_API]
+ int32_t IsCrashReportingEnabled([in] PP_Instance instance,
+ [in] PP_CompletionCallback callback);
};
diff --git a/chromium/ppapi/api/private/ppp_content_decryptor_private.idl b/chromium/ppapi/api/private/ppp_content_decryptor_private.idl
index b943efe4a8b..73a52258bb0 100644
--- a/chromium/ppapi/api/private/ppp_content_decryptor_private.idl
+++ b/chromium/ppapi/api/private/ppp_content_decryptor_private.idl
@@ -9,7 +9,7 @@
* Decryption Modules, not normal plugins.
*/
label Chrome {
- M33 = 0.9
+ M36 = 0.12
};
/**
@@ -31,30 +31,52 @@ interface PPP_ContentDecryptor_Private {
[in] 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(
[in] PP_Instance instance,
- [in] uint32_t session_id,
- [in] PP_Var type,
- [in] PP_Var init_data);
+ [in] uint32_t promise_id,
+ [in] PP_Var init_data_type,
+ [in] PP_Var init_data,
+ [in] 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(
+ [in] PP_Instance instance,
+ [in] uint32_t promise_id,
+ [in] PP_Var web_session_id);
/**
* Provides a license or other message to the decryptor.
@@ -68,7 +90,12 @@ interface PPP_ContentDecryptor_Private {
* <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
@@ -76,18 +103,25 @@ interface PPP_ContentDecryptor_Private {
*/
void UpdateSession(
[in] PP_Instance instance,
- [in] uint32_t session_id,
+ [in] uint32_t promise_id,
+ [in] PP_Var web_session_id,
[in] 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(
[in] PP_Instance instance,
- [in] uint32_t session_id);
+ [in] uint32_t promise_id,
+ [in] PP_Var web_session_id);
/**
* Decrypts the block and returns the unencrypted block via
diff --git a/chromium/ppapi/api/private/ppp_find_private.idl b/chromium/ppapi/api/private/ppp_find_private.idl
new file mode 100644
index 00000000000..bb6580c02f2
--- /dev/null
+++ b/chromium/ppapi/api/private/ppp_find_private.idl
@@ -0,0 +1,35 @@
+/* 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.
+ */
+
+label Chrome {
+ M14 = 0.3
+};
+
+interface PPP_Find_Private {
+ /**
+ * 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([in] PP_Instance instance,
+ [in] str_t text,
+ [in] PP_Bool case_sensitive);
+
+ /**
+ * Go to the next/previous result.
+ */
+ void SelectFindResult([in] PP_Instance instance,
+ [in] PP_Bool forward);
+
+ /**
+ * Tells the plugin that the find operation has stopped, so it should clear
+ * any highlighting.
+ */
+ void StopFind([in] PP_Instance instance);
+};