diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-09 20:51:38 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-09 20:51:38 +0000 |
commit | 0c1f6a1a5db1033c323c65b86db98a058ebabd74 (patch) | |
tree | 3e0cfe276b7f3f1764f95a582ba3a83639b0761b /ppapi | |
parent | 0e41f1fb32c9404f8131da48e83387d7c07d6728 (diff) | |
download | chromium_src-0c1f6a1a5db1033c323c65b86db98a058ebabd74.zip chromium_src-0c1f6a1a5db1033c323c65b86db98a058ebabd74.tar.gz chromium_src-0c1f6a1a5db1033c323c65b86db98a058ebabd74.tar.bz2 |
Remove PPB_Ext_Alarms_Dev and PPB_Ext_Events_Dev.
BUG=None
TEST=None
Review URL: https://codereview.chromium.org/103093004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239545 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/api/extensions/dev/ppb_ext_alarms_dev.idl | 178 | ||||
-rw-r--r-- | ppapi/api/extensions/dev/ppb_ext_events_dev.idl | 87 | ||||
-rw-r--r-- | ppapi/c/extensions/dev/ppb_ext_alarms_dev.h | 204 | ||||
-rw-r--r-- | ppapi/c/extensions/dev/ppb_ext_events_dev.h | 120 | ||||
-rw-r--r-- | ppapi/cpp/extensions/dev/alarms_dev.cc | 179 | ||||
-rw-r--r-- | ppapi/cpp/extensions/dev/alarms_dev.h | 117 | ||||
-rw-r--r-- | ppapi/cpp/extensions/dev/events_dev.cc | 43 | ||||
-rw-r--r-- | ppapi/cpp/extensions/dev/events_dev.h | 34 | ||||
-rw-r--r-- | ppapi/cpp/extensions/event_base.cc | 44 | ||||
-rw-r--r-- | ppapi/cpp/extensions/event_base.h | 232 | ||||
-rw-r--r-- | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c | 74 | ||||
-rw-r--r-- | ppapi/ppapi_shared.gypi | 1 | ||||
-rw-r--r-- | ppapi/ppapi_sources.gypi | 8 | ||||
-rw-r--r-- | ppapi/proxy/interface_list.cc | 1 | ||||
-rw-r--r-- | ppapi/tests/all_c_includes.h | 2 | ||||
-rw-r--r-- | ppapi/tests/all_cpp_includes.h | 1 | ||||
-rw-r--r-- | ppapi/thunk/interfaces_ppb_public_dev.h | 2 | ||||
-rw-r--r-- | ppapi/thunk/ppb_ext_alarms_thunk.cc | 95 |
18 files changed, 0 insertions, 1422 deletions
diff --git a/ppapi/api/extensions/dev/ppb_ext_alarms_dev.idl b/ppapi/api/extensions/dev/ppb_ext_alarms_dev.idl deleted file mode 100644 index 9e1fc65..0000000 --- a/ppapi/api/extensions/dev/ppb_ext_alarms_dev.idl +++ /dev/null @@ -1,178 +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.alarms</code> - * extension API. - */ - -label Chrome { - M27 = 0.1 -}; - -#inline c -#include "ppapi/c/extensions/dev/ppb_ext_events_dev.h" -#endinl - -/** - * A dictionary <code>PP_Var</code> which contains: - * - "name" : string <code>PP_Var</code> - * Name of this alarm. - * - * - "scheduledTime" : double <code>PP_Var</code> - * Time at which this alarm was scheduled to fire, in milliseconds past the - * epoch (e.g. <code>Date.now() + n</code>). For performance reasons, the - * alarm may have been delayed an arbitrary amount beyond this. - * - * - "periodInMinutes" : double or undefined <code>PP_Var</code> - * If not undefined, the alarm is a repeating alarm and will fire again in - * <var>periodInMinutes</var> minutes. - */ -typedef PP_Var PP_Ext_Alarms_Alarm_Dev; - -/** - * A dictionary <code>PP_Var</code> which contains - * - "when" : double or undefined <code>PP_Var</code> - * Time at which the alarm should fire, in milliseconds past the epoch - * (e.g. <code>Date.now() + n</code>). - * - * - "delayInMinutes" : double or undefined <code>PP_Var</code> - * Length of time in minutes after which the - * <code>PP_Ext_Alarms_OnAlarm_Dev</code> event should fire. - * - * - "periodInMinutes" : double or undefined <code>PP_Var</code> - * If set, the <code>PP_Ext_Alarms_OnAlarm_Dev</code> event should fire every - * <var>periodInMinutes</var> minutes after the initial event specified by - * <var>when</var> or <var>delayInMinutes</var>. If not set, the alarm will - * only fire once. - */ -typedef PP_Var PP_Ext_Alarms_AlarmCreateInfo_Dev; - -/** - * An array <code>PP_Var</code> which contains elements of - * <code>PP_Ext_Alarms_Alarm_Dev</code>. - */ -typedef PP_Var PP_Ext_Alarms_Alarm_Dev_Array; - -interface PPB_Ext_Alarms_Dev { - /** - * Creates an alarm. Near the time(s) specified by <var>alarm_info</var>, - * the <code>PP_Ext_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>$ref:[PP_Ext_Alarms_AlarmCreateInfo_Dev.delayInMinutes - * delayInMinutes]</code> or - * <code>$ref:[PP_Ext_Alarms_AlarmCreateInfo_Dev.periodInMinutes - * periodInMinutes]</code> to less than <code>1</code> will not be honored - * and will cause a warning. - * <code>$ref:[PP_Ext_Alarms_AlarmCreateInfo_Dev.when 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 A <code>PP_Var</code> whose contents conform to the - * description of <code>PP_Ext_Alarms_AlarmCreateInfo_Dev</code>. Describes - * when the alarm should fire. The initial time must be specified by either - * <var>when</var> or <var>delayInMinutes</var> (but not both). If - * <var>periodInMinutes</var> is set, the alarm will repeat every - * <var>periodInMinutes</var> minutes after the initial event. If neither - * <var>when</var> or <var>delayInMinutes</var> is set for a repeating alarm, - * <var>periodInMinutes</var> is used as the default for - * <var>delayInMinutes</var>. - */ - void Create( - [in] PP_Instance instance, - [in] PP_Var name, - [in] PP_Ext_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_Var</code> whose contents conform to the - * description of <code>PP_Ext_Alarms_Alarm_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 Get( - [in] PP_Instance instance, - [in] PP_Var name, - [out] PP_Ext_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_Var</code> whose contents conform to the - * description of <code>PP_Ext_Alarms_Alarm_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 GetAll( - [in] PP_Instance instance, - [out] PP_Ext_Alarms_Alarm_Dev_Array alarms, - [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); -}; - -/** - * 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 A <code>PP_Var</code> whose contents conform to the - * description of <code>PP_Ext_Alarms_Alarm_Dev</code>. The alarm that has - * elapsed. - */ -typedef void PP_Ext_Alarms_OnAlarm_Func_Dev_0_1( - [in] uint32_t listener_id, - [inout] mem_t user_data, - [in] PP_Ext_Alarms_Alarm_Dev alarm); - -#inline c -PP_INLINE struct PP_Ext_EventListener PP_Ext_Alarms_OnAlarm_Dev_0_1( - PP_Ext_Alarms_OnAlarm_Func_Dev_0_1 func, - void* user_data) { - return PP_Ext_MakeEventListener("alarms.onAlarm;0.1", - (PP_Ext_GenericFuncType)(func), user_data); -} - -#define PP_Ext_Alarms_OnAlarm_Dev PP_Ext_Alarms_OnAlarm_Dev_0_1 -#endinl diff --git a/ppapi/api/extensions/dev/ppb_ext_events_dev.idl b/ppapi/api/extensions/dev/ppb_ext_events_dev.idl deleted file mode 100644 index cfcc809..0000000 --- a/ppapi/api/extensions/dev/ppb_ext_events_dev.idl +++ /dev/null @@ -1,87 +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. - */ - -label Chrome { - M27 = 0.1 -}; - -/** - * Used to represent arbitrary C function pointers. Please note that usually - * the function that a <code>PP_Ext_GenericFuncType</code> pointer points to - * has a different signature than <code>void (*)()</code>. - */ -typedef void PP_Ext_GenericFuncType(); - -/** - * An event listener that can be registered with the browser and receive - * notifications via the callback function. - * - * A function is defined for each event type to return a properly-filled - * <code>PP_Ext_EventListener</code> struct, for example, - * <code>PP_Ext_Alarms_OnAlarm_Dev()</code>. - */ -[passByValue] -struct PP_Ext_EventListener { - /** - * The name of the event to register to. - */ - cstr_t event_name; - /** - * A callback function whose signature is determined by - * <code>event_name</code>. All calls will happen on the same thread as the - * one on which <code>AddListener()</code> is called. - */ - PP_Ext_GenericFuncType func; - /** - * An opaque pointer that will be passed to <code>func</code>. - */ - mem_t user_data; -}; - -interface PPB_Ext_Events_Dev { - /** - * Registers a listener to an event. - * - * @param[in] instance A <code>PP_Instance</code> identifying one instance of - * a module. - * @param[in] listener A <code>PP_Ext_EventListener</code> struct. - * - * @return An listener ID, or 0 if failed. - */ - uint32_t AddListener( - [in] PP_Instance instance, - [in] PP_Ext_EventListener listener); - - /** - * Deregisters a listener. - * - * @param[in] instance A <code>PP_Instance</code> identifying one instance of - * a module. - * @param[in] listener_id The ID returned by <code>AddListener()</code>. - */ - void RemoveListener( - [in] PP_Instance instance, - [in] uint32_t listener_id); -}; - -#inline c -/** - * Creates a <code>PP_Ext_EventListener</code> struct. - * - * Usually you should not call it directly. Instead you should call those - * functions that return a <code>PP_Ext_EventListener</code> struct for a - * specific event type, for example, <code>PP_Ext_Alarms_OnAlarm_Dev()</code>. - */ -PP_INLINE struct PP_Ext_EventListener PP_Ext_MakeEventListener( - const char* event_name, - PP_Ext_GenericFuncType func, - void* user_data) { - struct PP_Ext_EventListener listener; - listener.event_name = event_name; - listener.func = func; - listener.user_data = user_data; - return listener; -} -#endinl diff --git a/ppapi/c/extensions/dev/ppb_ext_alarms_dev.h b/ppapi/c/extensions/dev/ppb_ext_alarms_dev.h deleted file mode 100644 index e73de60..0000000 --- a/ppapi/c/extensions/dev/ppb_ext_alarms_dev.h +++ /dev/null @@ -1,204 +0,0 @@ -/* Copyright (c) 2013 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* From extensions/dev/ppb_ext_alarms_dev.idl, - * modified Wed Mar 20 13:50:11 2013. - */ - -#ifndef PPAPI_C_EXTENSIONS_DEV_PPB_EXT_ALARMS_DEV_H_ -#define PPAPI_C_EXTENSIONS_DEV_PPB_EXT_ALARMS_DEV_H_ - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_completion_callback.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_stdint.h" -#include "ppapi/c/pp_var.h" - -#define PPB_EXT_ALARMS_DEV_INTERFACE_0_1 "PPB_Ext_Alarms(Dev);0.1" -#define PPB_EXT_ALARMS_DEV_INTERFACE PPB_EXT_ALARMS_DEV_INTERFACE_0_1 - -/** - * @file - * This file defines the Pepper equivalent of the <code>chrome.alarms</code> - * extension API. - */ - - -#include "ppapi/c/extensions/dev/ppb_ext_events_dev.h" - -/** - * @addtogroup Typedefs - * @{ - */ -/** - * A dictionary <code>PP_Var</code> which contains: - * - "name" : string <code>PP_Var</code> - * Name of this alarm. - * - * - "scheduledTime" : double <code>PP_Var</code> - * Time at which this alarm was scheduled to fire, in milliseconds past the - * epoch (e.g. <code>Date.now() + n</code>). For performance reasons, the - * alarm may have been delayed an arbitrary amount beyond this. - * - * - "periodInMinutes" : double or undefined <code>PP_Var</code> - * If not undefined, the alarm is a repeating alarm and will fire again in - * <var>periodInMinutes</var> minutes. - */ -typedef struct PP_Var PP_Ext_Alarms_Alarm_Dev; - -/** - * A dictionary <code>PP_Var</code> which contains - * - "when" : double or undefined <code>PP_Var</code> - * Time at which the alarm should fire, in milliseconds past the epoch - * (e.g. <code>Date.now() + n</code>). - * - * - "delayInMinutes" : double or undefined <code>PP_Var</code> - * Length of time in minutes after which the - * <code>PP_Ext_Alarms_OnAlarm_Dev</code> event should fire. - * - * - "periodInMinutes" : double or undefined <code>PP_Var</code> - * If set, the <code>PP_Ext_Alarms_OnAlarm_Dev</code> event should fire every - * <var>periodInMinutes</var> minutes after the initial event specified by - * <var>when</var> or <var>delayInMinutes</var>. If not set, the alarm will - * only fire once. - */ -typedef struct PP_Var PP_Ext_Alarms_AlarmCreateInfo_Dev; - -/** - * An array <code>PP_Var</code> which contains elements of - * <code>PP_Ext_Alarms_Alarm_Dev</code>. - */ -typedef struct PP_Var PP_Ext_Alarms_Alarm_Dev_Array; -/** - * @} - */ - -/** - * @addtogroup Interfaces - * @{ - */ -struct PPB_Ext_Alarms_Dev_0_1 { - /** - * Creates an alarm. Near the time(s) specified by <var>alarm_info</var>, - * the <code>PP_Ext_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>$ref:[PP_Ext_Alarms_AlarmCreateInfo_Dev.delayInMinutes - * delayInMinutes]</code> or - * <code>$ref:[PP_Ext_Alarms_AlarmCreateInfo_Dev.periodInMinutes - * periodInMinutes]</code> to less than <code>1</code> will not be honored - * and will cause a warning. - * <code>$ref:[PP_Ext_Alarms_AlarmCreateInfo_Dev.when 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 A <code>PP_Var</code> whose contents conform to the - * description of <code>PP_Ext_Alarms_AlarmCreateInfo_Dev</code>. Describes - * when the alarm should fire. The initial time must be specified by either - * <var>when</var> or <var>delayInMinutes</var> (but not both). If - * <var>periodInMinutes</var> is set, the alarm will repeat every - * <var>periodInMinutes</var> minutes after the initial event. If neither - * <var>when</var> or <var>delayInMinutes</var> is set for a repeating alarm, - * <var>periodInMinutes</var> is used as the default for - * <var>delayInMinutes</var>. - */ - void (*Create)(PP_Instance instance, - struct PP_Var name, - PP_Ext_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_Var</code> whose contents conform to the - * description of <code>PP_Ext_Alarms_Alarm_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 (*Get)(PP_Instance instance, - struct PP_Var name, - PP_Ext_Alarms_Alarm_Dev* alarm, - struct PP_CompletionCallback callback); - /** - * Gets an array of all the alarms. - * - * @param[in] instance A <code>PP_Instance</code>. - * @param[out] alarms A <code>PP_Var</code> whose contents conform to the - * description of <code>PP_Ext_Alarms_Alarm_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 (*GetAll)(PP_Instance instance, - PP_Ext_Alarms_Alarm_Dev_Array* alarms, - struct PP_CompletionCallback callback); - /** - * Clears the alarm with the given name. - * - * @param[in] instance A <code>PP_Instance</code>. - * @param[in] name A string or undefined <code>PP_Var</code>. The name of the - * alarm to clear. Defaults to the empty string. - */ - void (*Clear)(PP_Instance instance, struct PP_Var name); - /** - * Clears all alarms. - * - * @param[in] instance A <code>PP_Instance</code>. - */ - void (*ClearAll)(PP_Instance instance); -}; - -typedef struct PPB_Ext_Alarms_Dev_0_1 PPB_Ext_Alarms_Dev; -/** - * @} - */ - -/** - * @addtogroup Typedefs - * @{ - */ -/** - * Fired when an alarm has elapsed. Useful for event pages. - * - * @param[in] listener_id The listener ID. - * @param[inout] user_data The opaque pointer that was used when registering the - * listener. - * @param[in] alarm A <code>PP_Var</code> whose contents conform to the - * description of <code>PP_Ext_Alarms_Alarm_Dev</code>. The alarm that has - * elapsed. - */ -typedef void (*PP_Ext_Alarms_OnAlarm_Func_Dev_0_1)( - uint32_t listener_id, - void* user_data, - PP_Ext_Alarms_Alarm_Dev alarm); -/** - * @} - */ - -PP_INLINE struct PP_Ext_EventListener PP_Ext_Alarms_OnAlarm_Dev_0_1( - PP_Ext_Alarms_OnAlarm_Func_Dev_0_1 func, - void* user_data) { - return PP_Ext_MakeEventListener("alarms.onAlarm;0.1", - (PP_Ext_GenericFuncType)(func), user_data); -} - -#define PP_Ext_Alarms_OnAlarm_Dev PP_Ext_Alarms_OnAlarm_Dev_0_1 -#endif /* PPAPI_C_EXTENSIONS_DEV_PPB_EXT_ALARMS_DEV_H_ */ - diff --git a/ppapi/c/extensions/dev/ppb_ext_events_dev.h b/ppapi/c/extensions/dev/ppb_ext_events_dev.h deleted file mode 100644 index 0c1c57a..0000000 --- a/ppapi/c/extensions/dev/ppb_ext_events_dev.h +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (c) 2013 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* From extensions/dev/ppb_ext_events_dev.idl, - * modified Mon Mar 18 17:18:20 2013. - */ - -#ifndef PPAPI_C_EXTENSIONS_DEV_PPB_EXT_EVENTS_DEV_H_ -#define PPAPI_C_EXTENSIONS_DEV_PPB_EXT_EVENTS_DEV_H_ - -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_stdint.h" - -#define PPB_EXT_EVENTS_DEV_INTERFACE_0_1 "PPB_Ext_Events(Dev);0.1" -#define PPB_EXT_EVENTS_DEV_INTERFACE PPB_EXT_EVENTS_DEV_INTERFACE_0_1 - -/** - * @file - */ - - -/** - * @addtogroup Typedefs - * @{ - */ -/** - * Used to represent arbitrary C function pointers. Please note that usually - * the function that a <code>PP_Ext_GenericFuncType</code> pointer points to - * has a different signature than <code>void (*)()</code>. - */ -typedef void (*PP_Ext_GenericFuncType)(void); -/** - * @} - */ - -/** - * @addtogroup Structs - * @{ - */ -/** - * An event listener that can be registered with the browser and receive - * notifications via the callback function. - * - * A function is defined for each event type to return a properly-filled - * <code>PP_Ext_EventListener</code> struct, for example, - * <code>PP_Ext_Alarms_OnAlarm_Dev()</code>. - */ -struct PP_Ext_EventListener { - /** - * The name of the event to register to. - */ - const char* event_name; - /** - * A callback function whose signature is determined by - * <code>event_name</code>. All calls will happen on the same thread as the - * one on which <code>AddListener()</code> is called. - */ - PP_Ext_GenericFuncType func; - /** - * An opaque pointer that will be passed to <code>func</code>. - */ - void* user_data; -}; -/** - * @} - */ - -/** - * @addtogroup Interfaces - * @{ - */ -struct PPB_Ext_Events_Dev_0_1 { - /** - * Registers a listener to an event. - * - * @param[in] instance A <code>PP_Instance</code> identifying one instance of - * a module. - * @param[in] listener A <code>PP_Ext_EventListener</code> struct. - * - * @return An listener ID, or 0 if failed. - */ - uint32_t (*AddListener)(PP_Instance instance, - struct PP_Ext_EventListener listener); - /** - * Deregisters a listener. - * - * @param[in] instance A <code>PP_Instance</code> identifying one instance of - * a module. - * @param[in] listener_id The ID returned by <code>AddListener()</code>. - */ - void (*RemoveListener)(PP_Instance instance, uint32_t listener_id); -}; - -typedef struct PPB_Ext_Events_Dev_0_1 PPB_Ext_Events_Dev; -/** - * @} - */ - -/** - * Creates a <code>PP_Ext_EventListener</code> struct. - * - * Usually you should not call it directly. Instead you should call those - * functions that return a <code>PP_Ext_EventListener</code> struct for a - * specific event type, for example, <code>PP_Ext_Alarms_OnAlarm_Dev()</code>. - */ -PP_INLINE struct PP_Ext_EventListener PP_Ext_MakeEventListener( - const char* event_name, - PP_Ext_GenericFuncType func, - void* user_data) { - struct PP_Ext_EventListener listener; - listener.event_name = event_name; - listener.func = func; - listener.user_data = user_data; - return listener; -} -#endif /* PPAPI_C_EXTENSIONS_DEV_PPB_EXT_EVENTS_DEV_H_ */ - diff --git a/ppapi/cpp/extensions/dev/alarms_dev.cc b/ppapi/cpp/extensions/dev/alarms_dev.cc deleted file mode 100644 index 1cf8464..0000000 --- a/ppapi/cpp/extensions/dev/alarms_dev.cc +++ /dev/null @@ -1,179 +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. - -#include "ppapi/cpp/extensions/dev/alarms_dev.h" - -#include "ppapi/cpp/completion_callback.h" -#include "ppapi/cpp/extensions/optional.h" -#include "ppapi/cpp/extensions/to_var_converter.h" -#include "ppapi/cpp/logging.h" -#include "ppapi/cpp/module_impl.h" -#include "ppapi/cpp/var_dictionary.h" - -namespace pp { - -namespace { - -template <> const char* interface_name<PPB_Ext_Alarms_Dev_0_1>() { - return PPB_EXT_ALARMS_DEV_INTERFACE_0_1; -} - -} // namespace - -namespace ext { -namespace alarms { - -const char* const Alarm_Dev::kName = "name"; -const char* const Alarm_Dev::kScheduledTime = "scheduledTime"; -const char* const Alarm_Dev::kPeriodInMinutes = "periodInMinutes"; - -Alarm_Dev::Alarm_Dev() - : name(kName), - scheduled_time(kScheduledTime), - period_in_minutes(kPeriodInMinutes) { -} - -Alarm_Dev::~Alarm_Dev() { -} - -bool Alarm_Dev::Populate(const PP_Ext_Alarms_Alarm_Dev& value) { - if (value.type != PP_VARTYPE_DICTIONARY) - return false; - - VarDictionary dict(value); - bool result = name.Populate(dict); - result = scheduled_time.Populate(dict) && result; - result = period_in_minutes.Populate(dict) && result; - - return result; -} - -Var Alarm_Dev::CreateVar() const { - VarDictionary dict; - - bool result = name.AddTo(&dict); - result = scheduled_time.AddTo(&dict) && result; - result = period_in_minutes.MayAddTo(&dict) && result; - PP_DCHECK(result); - - return dict; -} - -const char* const AlarmCreateInfo_Dev::kWhen = "when"; -const char* const AlarmCreateInfo_Dev::kDelayInMinutes = "delayInMinutes"; -const char* const AlarmCreateInfo_Dev::kPeriodInMinutes = "periodInMinutes"; - -AlarmCreateInfo_Dev::AlarmCreateInfo_Dev() - : when(kWhen), - delay_in_minutes(kDelayInMinutes), - period_in_minutes(kPeriodInMinutes) { -} - -AlarmCreateInfo_Dev::~AlarmCreateInfo_Dev() { -} - -bool AlarmCreateInfo_Dev::Populate( - const PP_Ext_Alarms_AlarmCreateInfo_Dev& value) { - if (value.type != PP_VARTYPE_DICTIONARY) - return false; - - VarDictionary dict(value); - bool result = when.Populate(dict); - result = delay_in_minutes.Populate(dict) && result; - result = period_in_minutes.Populate(dict) && result; - - return result; -} - -Var AlarmCreateInfo_Dev::CreateVar() const { - VarDictionary dict; - - bool result = when.MayAddTo(&dict); - result = delay_in_minutes.MayAddTo(&dict) && result; - result = period_in_minutes.MayAddTo(&dict) && result; - PP_DCHECK(result); - - return dict; -} - -Alarms_Dev::Alarms_Dev(const InstanceHandle& instance) : instance_(instance) { -} - -Alarms_Dev::~Alarms_Dev() { -} - -void Alarms_Dev::Create(const Optional<std::string>& name, - const AlarmCreateInfo_Dev& alarm_info) { - if (!has_interface<PPB_Ext_Alarms_Dev_0_1>()) - return; - - internal::ToVarConverter<Optional<std::string> > name_var(name); - internal::ToVarConverter<AlarmCreateInfo_Dev> alarm_info_var(alarm_info); - - return get_interface<PPB_Ext_Alarms_Dev_0_1>()->Create( - instance_.pp_instance(), - name_var.pp_var(), - alarm_info_var.pp_var()); -} - -int32_t Alarms_Dev::Get(const Optional<std::string>& name, - const GetCallback& callback) { - if (!has_interface<PPB_Ext_Alarms_Dev_0_1>()) - return callback.MayForce(PP_ERROR_NOINTERFACE); - - internal::ToVarConverter<Optional<std::string> > name_var(name); - - return get_interface<PPB_Ext_Alarms_Dev_0_1>()->Get( - instance_.pp_instance(), - name_var.pp_var(), - callback.output(), - callback.pp_completion_callback()); -} - -int32_t Alarms_Dev::GetAll(const GetAllCallback& callback) { - if (!has_interface<PPB_Ext_Alarms_Dev_0_1>()) - return callback.MayForce(PP_ERROR_NOINTERFACE); - - return get_interface<PPB_Ext_Alarms_Dev_0_1>()->GetAll( - instance_.pp_instance(), - callback.output(), - callback.pp_completion_callback()); -} - -void Alarms_Dev::Clear(const Optional<std::string>& name) { - if (!has_interface<PPB_Ext_Alarms_Dev_0_1>()) - return; - - internal::ToVarConverter<Optional<std::string> > name_var(name); - - return get_interface<PPB_Ext_Alarms_Dev_0_1>()->Clear( - instance_.pp_instance(), - name_var.pp_var()); -} - -void Alarms_Dev::ClearAll() { - if (!has_interface<PPB_Ext_Alarms_Dev_0_1>()) - return; - - return get_interface<PPB_Ext_Alarms_Dev_0_1>()->ClearAll( - instance_.pp_instance()); -} - -OnAlarmEvent_Dev::OnAlarmEvent_Dev( - const InstanceHandle& instance, - Listener* listener) - : internal::EventBase1<PP_Ext_Alarms_OnAlarm_Dev, Alarm_Dev>(instance), - listener_(listener) { -} - -OnAlarmEvent_Dev::~OnAlarmEvent_Dev() { -} - -void OnAlarmEvent_Dev::Callback(Alarm_Dev& alarm) { - listener_->OnAlarm(alarm); -} - -} // namespace alarms -} // namespace ext -} // namespace pp diff --git a/ppapi/cpp/extensions/dev/alarms_dev.h b/ppapi/cpp/extensions/dev/alarms_dev.h deleted file mode 100644 index 57d82d0..0000000 --- a/ppapi/cpp/extensions/dev/alarms_dev.h +++ /dev/null @@ -1,117 +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. - -#ifndef PPAPI_CPP_EXTENSIONS_DEV_ALARMS_DEV_H_ -#define PPAPI_CPP_EXTENSIONS_DEV_ALARMS_DEV_H_ - -#include <string> -#include <vector> - -#include "ppapi/c/extensions/dev/ppb_ext_alarms_dev.h" -#include "ppapi/cpp/extensions/dict_field.h" -#include "ppapi/cpp/extensions/event_base.h" -#include "ppapi/cpp/extensions/ext_output_traits.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/var.h" - -namespace pp { -namespace ext { - -template <class T> -class ExtCompletionCallbackWithOutput; - -template <class T> -class Optional; - -namespace alarms { - -// Data types ------------------------------------------------------------------ -class Alarm_Dev { - public: - Alarm_Dev(); - ~Alarm_Dev(); - - bool Populate(const PP_Ext_Alarms_Alarm_Dev& value); - - Var CreateVar() const; - - static const char* const kName; - static const char* const kScheduledTime; - static const char* const kPeriodInMinutes; - - DictField<std::string> name; - DictField<double> scheduled_time; - OptionalDictField<double> period_in_minutes; -}; - -class AlarmCreateInfo_Dev { - public: - AlarmCreateInfo_Dev(); - ~AlarmCreateInfo_Dev(); - - bool Populate(const PP_Ext_Alarms_AlarmCreateInfo_Dev& value); - - Var CreateVar() const; - - static const char* const kWhen; - static const char* const kDelayInMinutes; - static const char* const kPeriodInMinutes; - - OptionalDictField<double> when; - OptionalDictField<double> delay_in_minutes; - OptionalDictField<double> period_in_minutes; -}; - -// Functions ------------------------------------------------------------------- -class Alarms_Dev { - public: - explicit Alarms_Dev(const InstanceHandle& instance); - ~Alarms_Dev(); - - void Create(const Optional<std::string>& name, - const AlarmCreateInfo_Dev& alarm_info); - - typedef ExtCompletionCallbackWithOutput<Alarm_Dev> GetCallback; - int32_t Get(const Optional<std::string>& name, const GetCallback& callback); - - typedef ExtCompletionCallbackWithOutput<std::vector<Alarm_Dev> > - GetAllCallback; - int32_t GetAll(const GetAllCallback& callback); - - void Clear(const Optional<std::string>& name); - - void ClearAll(); - - private: - InstanceHandle instance_; -}; - -// Events ---------------------------------------------------------------------- -// Please see ppapi/cpp/extensions/event_base.h for how to use an event class. - -class OnAlarmEvent_Dev - : public internal::EventBase1<PP_Ext_Alarms_OnAlarm_Dev, Alarm_Dev> { - public: - class Listener { - public: - virtual ~Listener() {} - - virtual void OnAlarm(Alarm_Dev& alarm) = 0; - }; - - // |listener| is not owned by this instance and must outlive it. - OnAlarmEvent_Dev(const InstanceHandle& instance, Listener* listener); - virtual ~OnAlarmEvent_Dev(); - - private: - virtual void Callback(Alarm_Dev& alarm); - - Listener* listener_; -}; - -} // namespace alarms -} // namespace ext -} // namespace pp - -#endif // PPAPI_CPP_EXTENSIONS_DEV_ALARMS_DEV_H_ diff --git a/ppapi/cpp/extensions/dev/events_dev.cc b/ppapi/cpp/extensions/dev/events_dev.cc deleted file mode 100644 index d80008f..0000000 --- a/ppapi/cpp/extensions/dev/events_dev.cc +++ /dev/null @@ -1,43 +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. - -#include "ppapi/cpp/extensions/dev/events_dev.h" - -#include "ppapi/c/extensions/dev/ppb_ext_events_dev.h" -#include "ppapi/cpp/module_impl.h" - -namespace pp { - -namespace { - -template <> const char* interface_name<PPB_Ext_Events_Dev_0_1>() { - return PPB_EXT_EVENTS_DEV_INTERFACE_0_1; -} - -} // namespace - -namespace ext { -namespace events { - -// static -uint32_t Events_Dev::AddListener(PP_Instance instance, - const PP_Ext_EventListener& listener) { - if (!has_interface<PPB_Ext_Events_Dev_0_1>()) - return 0; - return get_interface<PPB_Ext_Events_Dev_0_1>()->AddListener(instance, - listener); -} - -// static -void Events_Dev::RemoveListener(PP_Instance instance, - uint32_t listener_id) { - if (has_interface<PPB_Ext_Events_Dev_0_1>()) { - get_interface<PPB_Ext_Events_Dev_0_1>()->RemoveListener(instance, - listener_id); - } -} - -} // namespace events -} // namespace ext -} // namespace pp diff --git a/ppapi/cpp/extensions/dev/events_dev.h b/ppapi/cpp/extensions/dev/events_dev.h deleted file mode 100644 index e816ca5..0000000 --- a/ppapi/cpp/extensions/dev/events_dev.h +++ /dev/null @@ -1,34 +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. - -#ifndef PPAPI_CPP_EXTENSIONS_DEV_EVENTS_DEV_H_ -#define PPAPI_CPP_EXTENSIONS_DEV_EVENTS_DEV_H_ - -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_stdint.h" - -struct PP_Ext_EventListener; - -namespace pp { -namespace ext { -namespace events { - -// This is a simple wrapper of the PPB_Ext_Events_Dev interface. -// -// Usually you don't have to directly use this interface. Instead, you could -// use those more object-oriented event classes. Please see -// ppapi/cpp/extensions/event_base.h for more details. -class Events_Dev { - public: - static uint32_t AddListener(PP_Instance instance, - const PP_Ext_EventListener& listener); - - static void RemoveListener(PP_Instance instance, uint32_t listener_id); -}; - -} // namespace events -} // namespace ext -} // namespace pp - -#endif // PPAPI_CPP_EXTENSIONS_DEV_EVENTS_DEV_H_ diff --git a/ppapi/cpp/extensions/event_base.cc b/ppapi/cpp/extensions/event_base.cc deleted file mode 100644 index 210b213..0000000 --- a/ppapi/cpp/extensions/event_base.cc +++ /dev/null @@ -1,44 +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. - -#include "ppapi/cpp/extensions/event_base.h" - -#include "ppapi/cpp/extensions/dev/events_dev.h" - -namespace pp { -namespace ext { -namespace internal { - -GenericEventBase::GenericEventBase( - const InstanceHandle& instance, - const PP_Ext_EventListener& pp_listener) - : instance_(instance), - listener_id_(0), - pp_listener_(pp_listener) { -} - -GenericEventBase::~GenericEventBase() { - StopListening(); -} - -bool GenericEventBase::StartListening() { - if (IsListening()) - return true; - - listener_id_ = events::Events_Dev::AddListener(instance_.pp_instance(), - pp_listener_); - return IsListening(); -} - -void GenericEventBase::StopListening() { - if (!IsListening()) - return; - - events::Events_Dev::RemoveListener(instance_.pp_instance(), listener_id_); - listener_id_ = 0; -} - -} // namespace internal -} // namespace ext -} // namespace pp diff --git a/ppapi/cpp/extensions/event_base.h b/ppapi/cpp/extensions/event_base.h deleted file mode 100644 index 75144c0..0000000 --- a/ppapi/cpp/extensions/event_base.h +++ /dev/null @@ -1,232 +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. - -#ifndef PPAPI_CPP_EXTENSIONS_EVENT_BASE_H_ -#define PPAPI_CPP_EXTENSIONS_EVENT_BASE_H_ - -#include "ppapi/c/extensions/dev/ppb_ext_events_dev.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_stdint.h" -#include "ppapi/c/pp_var.h" -#include "ppapi/cpp/extensions/from_var_converter.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/logging.h" - -namespace pp { -namespace ext { -namespace internal { - -// This file contains base classes for events. Usually you don't need to use -// them directly. -// -// For each event type, there is a corresponding event class derived from -// EventBase[0-3]. The event class defines a Listener interface and exposes the -// public methods of GenericEventBase. -// -// Take pp::ext::alarms::OnAlarmEvent_Dev as example, your code to listen to the -// event would look like this: -// -// class MyListener : public pp::ext::alarms::OnAlarmEvent_Dev { -// ... -// // The parameter is a non-const reference so you could directly modify it -// // if necessary. -// virtual void OnAlarm(Alarm_Dev& alarm) { -// ...handle the event... -// } -// }; -// -// MyListener on_alarm_listener; -// // The listener is not owned by the event and must outlive it. -// pp::ext::alarms::OnAlarmEvent_Dev on_alarm(instance, &on_alarm_listener); -// on_alarm.StartListening(); -// ... -// // It is guaranteed that |on_alarm_listener| won't get called after -// // |on_alarm| goes away. So this step is optional. -// on_alarm.StopListening(); - -class GenericEventBase { - public: - bool StartListening(); - void StopListening(); - - bool IsListening() const { return listener_id_ != 0; } - uint32_t listener_id() const { return listener_id_; } - - protected: - GenericEventBase(const InstanceHandle& instance, - const PP_Ext_EventListener& pp_listener); - ~GenericEventBase(); - - InstanceHandle instance_; - uint32_t listener_id_; - const PP_Ext_EventListener pp_listener_; - - private: - // Disallow copying and assignment. - GenericEventBase(const GenericEventBase&); - GenericEventBase& operator=(const GenericEventBase&); -}; - -// EventBase[0-3] are event base classes which can be instantiated with a -// pointer to a PP_Ext_EventListener creation function and the input parameter -// types of the listener callback. -// -// For example, EvenBase1<PP_Ext_Alarms_OnAlarm_Dev, Alarm_Dev> deals with -// the event type defined by the PP_Ext_Alarms_OnAlarm_Dev function pointer. And -// it defines a pure virtual method as the listener callback: -// virtual void Callback(Alarm_Dev&) = 0; - -typedef PP_Ext_EventListener (*CreatePPEventListener0)( - void (*)(uint32_t, void*), void*); -template <const CreatePPEventListener0 kCreatePPEventListener0> -class EventBase0 : public GenericEventBase { - public: - explicit EventBase0(const InstanceHandle& instance) - : PP_ALLOW_THIS_IN_INITIALIZER_LIST( - GenericEventBase(instance, - kCreatePPEventListener0(&CallbackThunk, this))) { - } - - virtual ~EventBase0() {} - - private: - virtual void Callback() = 0; - - static void CallbackThunk(uint32_t listener_id, void* user_data) { - EventBase0<kCreatePPEventListener0>* event_base = - static_cast<EventBase0<kCreatePPEventListener0>*>(user_data); - PP_DCHECK(listener_id == event_base->listener_id_); - // Suppress unused variable warnings. - static_cast<void>(listener_id); - - event_base->Callback(); - } - - // Disallow copying and assignment. - EventBase0(const EventBase0<kCreatePPEventListener0>&); - EventBase0<kCreatePPEventListener0>& operator=( - const EventBase0<kCreatePPEventListener0>&); -}; - -typedef PP_Ext_EventListener (*CreatePPEventListener1)( - void (*)(uint32_t, void*, PP_Var), void*); -template <const CreatePPEventListener1 kCreatePPEventListener1, class A> -class EventBase1 : public GenericEventBase { - public: - explicit EventBase1(const InstanceHandle& instance) - : PP_ALLOW_THIS_IN_INITIALIZER_LIST( - GenericEventBase(instance, - kCreatePPEventListener1(&CallbackThunk, this))) { - } - - virtual ~EventBase1() {} - - private: - virtual void Callback(A&) = 0; - - static void CallbackThunk(uint32_t listener_id, - void* user_data, - PP_Var var_a) { - EventBase1<kCreatePPEventListener1, A>* event_base = - static_cast<EventBase1<kCreatePPEventListener1, A>*>(user_data); - PP_DCHECK(listener_id == event_base->listener_id_); - // Suppress unused variable warnings. - static_cast<void>(listener_id); - - FromVarConverter<A> a(var_a); - event_base->Callback(a.value()); - } - - // Disallow copying and assignment. - EventBase1(const EventBase1<kCreatePPEventListener1, A>&); - EventBase1<kCreatePPEventListener1, A>& operator=( - const EventBase1<kCreatePPEventListener1, A>&); -}; - -typedef PP_Ext_EventListener (*CreatePPEventListener2)( - void (*)(uint32_t, void*, PP_Var, PP_Var), void*); -template <const CreatePPEventListener2 kCreatePPEventListener2, - class A, - class B> -class EventBase2 : public GenericEventBase { - public: - explicit EventBase2(const InstanceHandle& instance) - : PP_ALLOW_THIS_IN_INITIALIZER_LIST( - GenericEventBase(instance, - kCreatePPEventListener2(&CallbackThunk, this))) { - } - - virtual ~EventBase2() {} - - private: - virtual void Callback(A&, B&) = 0; - - static void CallbackThunk(uint32_t listener_id, - void* user_data, - PP_Var var_a, - PP_Var var_b) { - EventBase2<kCreatePPEventListener2, A, B>* event_base = - static_cast<EventBase2<kCreatePPEventListener2, A, B>*>(user_data); - PP_DCHECK(listener_id == event_base->listener_id_); - // Suppress unused variable warnings. - static_cast<void>(listener_id); - - FromVarConverter<A> a(var_a); - FromVarConverter<B> b(var_b); - event_base->Callback(a.value(), b.value()); - } - - // Disallow copying and assignment. - EventBase2(const EventBase2<kCreatePPEventListener2, A, B>&); - EventBase2<kCreatePPEventListener2, A, B>& operator=( - const EventBase2<kCreatePPEventListener2, A, B>&); -}; - -typedef PP_Ext_EventListener (*CreatePPEventListener3)( - void (*)(uint32_t, void*, PP_Var, PP_Var, PP_Var), void*); -template <const CreatePPEventListener3 kCreatePPEventListener3, - class A, - class B, - class C> -class EventBase3 : public GenericEventBase { - public: - explicit EventBase3(const InstanceHandle& instance) - : PP_ALLOW_THIS_IN_INITIALIZER_LIST( - GenericEventBase(instance, - kCreatePPEventListener3(&CallbackThunk, this))) { - } - - virtual ~EventBase3() {} - - private: - virtual void Callback(A&, B&, C&) = 0; - - static void CallbackThunk(uint32_t listener_id, - void* user_data, - PP_Var var_a, - PP_Var var_b, - PP_Var var_c) { - EventBase3<kCreatePPEventListener3, A, B, C>* event_base = - static_cast<EventBase3<kCreatePPEventListener3, A, B, C>*>(user_data); - PP_DCHECK(listener_id == event_base->listener_id_); - // Suppress unused variable warnings. - static_cast<void>(listener_id); - - FromVarConverter<A> a(var_a); - FromVarConverter<B> b(var_b); - FromVarConverter<C> c(var_c); - event_base->Callback(a.value(), b.value(), c.value()); - } - - // Disallow copying and assignment. - EventBase3(const EventBase3<kCreatePPEventListener3, A, B, C>&); - EventBase3<kCreatePPEventListener3, A, B, C>& operator=( - const EventBase3<kCreatePPEventListener3, A, B, C>&); -}; - -} // namespace internal -} // namespace ext -} // namespace pp - -#endif // PPAPI_CPP_EXTENSIONS_EVENT_BASE_H_ diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index d22ec78..69f3ea4 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -42,8 +42,6 @@ #include "ppapi/c/dev/ppp_video_decoder_dev.h" #include "ppapi/c/dev/ppp_widget_dev.h" #include "ppapi/c/dev/ppp_zoom_dev.h" -#include "ppapi/c/extensions/dev/ppb_ext_alarms_dev.h" -#include "ppapi/c/extensions/dev/ppb_ext_events_dev.h" #include "ppapi/c/extensions/dev/ppb_ext_socket_dev.h" #include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio_config.h" @@ -235,8 +233,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_X509Certificate_Private_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_ContentDecryptor_Private_0_9; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Instance_Private_0_1; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Alarms_Dev_0_1; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Events_Dev_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Socket_Dev_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Socket_Dev_0_2; /* END Declarations for all Wrapper Infos. */ @@ -3858,49 +3854,6 @@ static struct PP_Var Pnacl_M18_PPP_Instance_Private_GetInstanceObject(PP_Instanc /* End wrapper methods for PPP_Instance_Private_0_1 */ -/* Begin wrapper methods for PPB_Ext_Alarms_Dev_0_1 */ - -static void Pnacl_M27_PPB_Ext_Alarms_Dev_Create(PP_Instance instance, struct PP_Var* name, PP_Ext_Alarms_AlarmCreateInfo_Dev alarm_info) { - const struct PPB_Ext_Alarms_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_Ext_Alarms_Dev_0_1.real_iface; - iface->Create(instance, *name, alarm_info); -} - -static int32_t Pnacl_M27_PPB_Ext_Alarms_Dev_Get(PP_Instance instance, struct PP_Var* name, PP_Ext_Alarms_Alarm_Dev* alarm, struct PP_CompletionCallback* callback) { - const struct PPB_Ext_Alarms_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_Ext_Alarms_Dev_0_1.real_iface; - return iface->Get(instance, *name, alarm, *callback); -} - -static int32_t Pnacl_M27_PPB_Ext_Alarms_Dev_GetAll(PP_Instance instance, PP_Ext_Alarms_Alarm_Dev_Array* alarms, struct PP_CompletionCallback* callback) { - const struct PPB_Ext_Alarms_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_Ext_Alarms_Dev_0_1.real_iface; - return iface->GetAll(instance, alarms, *callback); -} - -static void Pnacl_M27_PPB_Ext_Alarms_Dev_Clear(PP_Instance instance, struct PP_Var* name) { - const struct PPB_Ext_Alarms_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_Ext_Alarms_Dev_0_1.real_iface; - iface->Clear(instance, *name); -} - -static void Pnacl_M27_PPB_Ext_Alarms_Dev_ClearAll(PP_Instance instance) { - const struct PPB_Ext_Alarms_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_Ext_Alarms_Dev_0_1.real_iface; - iface->ClearAll(instance); -} - -/* End wrapper methods for PPB_Ext_Alarms_Dev_0_1 */ - -/* Begin wrapper methods for PPB_Ext_Events_Dev_0_1 */ - -static uint32_t Pnacl_M27_PPB_Ext_Events_Dev_AddListener(PP_Instance instance, struct PP_Ext_EventListener* listener) { - const struct PPB_Ext_Events_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_Ext_Events_Dev_0_1.real_iface; - return iface->AddListener(instance, *listener); -} - -static void Pnacl_M27_PPB_Ext_Events_Dev_RemoveListener(PP_Instance instance, uint32_t listener_id) { - const struct PPB_Ext_Events_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_Ext_Events_Dev_0_1.real_iface; - iface->RemoveListener(instance, listener_id); -} - -/* End wrapper methods for PPB_Ext_Events_Dev_0_1 */ - /* Begin wrapper methods for PPB_Ext_Socket_Dev_0_1 */ static int32_t Pnacl_M28_PPB_Ext_Socket_Dev_Create(PP_Instance instance, PP_Ext_Socket_SocketType_Dev type, PP_Ext_Socket_CreateOptions_Dev options, PP_Ext_Socket_CreateInfo_Dev* create_info, struct PP_CompletionCallback* callback) { @@ -5113,19 +5066,6 @@ struct PPP_Instance_Private_0_1 Pnacl_Wrappers_PPP_Instance_Private_0_1 = { .GetInstanceObject = &Pnacl_M18_PPP_Instance_Private_GetInstanceObject }; -struct PPB_Ext_Alarms_Dev_0_1 Pnacl_Wrappers_PPB_Ext_Alarms_Dev_0_1 = { - .Create = (void (*)(PP_Instance instance, struct PP_Var name, PP_Ext_Alarms_AlarmCreateInfo_Dev alarm_info))&Pnacl_M27_PPB_Ext_Alarms_Dev_Create, - .Get = (int32_t (*)(PP_Instance instance, struct PP_Var name, PP_Ext_Alarms_Alarm_Dev* alarm, struct PP_CompletionCallback callback))&Pnacl_M27_PPB_Ext_Alarms_Dev_Get, - .GetAll = (int32_t (*)(PP_Instance instance, PP_Ext_Alarms_Alarm_Dev_Array* alarms, struct PP_CompletionCallback callback))&Pnacl_M27_PPB_Ext_Alarms_Dev_GetAll, - .Clear = (void (*)(PP_Instance instance, struct PP_Var name))&Pnacl_M27_PPB_Ext_Alarms_Dev_Clear, - .ClearAll = (void (*)(PP_Instance instance))&Pnacl_M27_PPB_Ext_Alarms_Dev_ClearAll -}; - -struct PPB_Ext_Events_Dev_0_1 Pnacl_Wrappers_PPB_Ext_Events_Dev_0_1 = { - .AddListener = (uint32_t (*)(PP_Instance instance, struct PP_Ext_EventListener listener))&Pnacl_M27_PPB_Ext_Events_Dev_AddListener, - .RemoveListener = (void (*)(PP_Instance instance, uint32_t listener_id))&Pnacl_M27_PPB_Ext_Events_Dev_RemoveListener -}; - struct PPB_Ext_Socket_Dev_0_1 Pnacl_Wrappers_PPB_Ext_Socket_Dev_0_1 = { .Create = (int32_t (*)(PP_Instance instance, PP_Ext_Socket_SocketType_Dev type, PP_Ext_Socket_CreateOptions_Dev options, PP_Ext_Socket_CreateInfo_Dev* create_info, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_Ext_Socket_Dev_Create, .Destroy = (void (*)(PP_Instance instance, struct PP_Var socket_id))&Pnacl_M28_PPB_Ext_Socket_Dev_Destroy, @@ -5755,18 +5695,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Instance_Private_0_1 = { .real_iface = NULL }; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Alarms_Dev_0_1 = { - .iface_macro = PPB_EXT_ALARMS_DEV_INTERFACE_0_1, - .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Ext_Alarms_Dev_0_1, - .real_iface = NULL -}; - -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Events_Dev_0_1 = { - .iface_macro = PPB_EXT_EVENTS_DEV_INTERFACE_0_1, - .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Ext_Events_Dev_0_1, - .real_iface = NULL -}; - static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Socket_Dev_0_1 = { .iface_macro = PPB_EXT_SOCKET_DEV_INTERFACE_0_1, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Ext_Socket_Dev_0_1, @@ -5874,8 +5802,6 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1, &Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1, &Pnacl_WrapperInfo_PPB_X509Certificate_Private_0_1, - &Pnacl_WrapperInfo_PPB_Ext_Alarms_Dev_0_1, - &Pnacl_WrapperInfo_PPB_Ext_Events_Dev_0_1, &Pnacl_WrapperInfo_PPB_Ext_Socket_Dev_0_1, &Pnacl_WrapperInfo_PPB_Ext_Socket_Dev_0_2, NULL diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi index a4b8267..0a96e4e 100644 --- a/ppapi/ppapi_shared.gypi +++ b/ppapi/ppapi_shared.gypi @@ -149,7 +149,6 @@ 'thunk/ppb_cursor_control_thunk.cc', 'thunk/ppb_device_ref_api.h', 'thunk/ppb_device_ref_dev_thunk.cc', - 'thunk/ppb_ext_alarms_thunk.cc', 'thunk/ppb_ext_crx_file_system_private_thunk.cc', 'thunk/ppb_ext_socket_thunk.cc', 'thunk/ppb_file_chooser_api.h', diff --git a/ppapi/ppapi_sources.gypi b/ppapi/ppapi_sources.gypi index abbedb8..cae19b4 100644 --- a/ppapi/ppapi_sources.gypi +++ b/ppapi/ppapi_sources.gypi @@ -143,8 +143,6 @@ 'c/trusted/ppp_broker.h', # Extensions dev interfaces. - 'c/extensions/dev/ppb_ext_alarms_dev.h', - 'c/extensions/dev/ppb_ext_events_dev.h', 'c/extensions/dev/ppb_ext_socket_dev.h', ], 'cpp_source_files': [ @@ -360,18 +358,12 @@ # Extensions interfaces. 'cpp/extensions/dict_field.h', - 'cpp/extensions/event_base.cc', - 'cpp/extensions/event_base.h', 'cpp/extensions/ext_output_traits.h', 'cpp/extensions/from_var_converter.h', 'cpp/extensions/optional.h', 'cpp/extensions/to_var_converter.h', # Extensions dev interfaces. - 'cpp/extensions/dev/alarms_dev.cc', - 'cpp/extensions/dev/alarms_dev.h', - 'cpp/extensions/dev/events_dev.cc', - 'cpp/extensions/dev/events_dev.h', 'cpp/extensions/dev/socket_dev.cc', 'cpp/extensions/dev/socket_dev.h', diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc index ed634db..b32a07e 100644 --- a/ppapi/proxy/interface_list.cc +++ b/ppapi/proxy/interface_list.cc @@ -29,7 +29,6 @@ #include "ppapi/c/dev/ppb_var_resource_dev.h" #include "ppapi/c/dev/ppb_video_capture_dev.h" #include "ppapi/c/dev/ppb_view_dev.h" -#include "ppapi/c/extensions/dev/ppb_ext_alarms_dev.h" #include "ppapi/c/extensions/dev/ppb_ext_socket_dev.h" #include "ppapi/c/ppb_audio_config.h" #include "ppapi/c/ppb_audio.h" diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index e89f4d1..1dbd4e1 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -43,8 +43,6 @@ #include "ppapi/c/dev/ppp_video_decoder_dev.h" #include "ppapi/c/dev/ppp_widget_dev.h" #include "ppapi/c/dev/ppp_zoom_dev.h" -#include "ppapi/c/extensions/dev/ppb_ext_alarms_dev.h" -#include "ppapi/c/extensions/dev/ppb_ext_events_dev.h" #include "ppapi/c/extensions/dev/ppb_ext_socket_dev.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_completion_callback.h" diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h index 3e57c29..a72e29e 100644 --- a/ppapi/tests/all_cpp_includes.h +++ b/ppapi/tests/all_cpp_includes.h @@ -33,7 +33,6 @@ #include "ppapi/cpp/dev/widget_dev.h" #include "ppapi/cpp/dev/zoom_dev.h" #include "ppapi/cpp/directory_entry.h" -#include "ppapi/cpp/extensions/dev/alarms_dev.h" #include "ppapi/cpp/extensions/dev/socket_dev.h" #include "ppapi/cpp/file_io.h" #include "ppapi/cpp/file_ref.h" diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h index 1ad85bc..44af06d 100644 --- a/ppapi/thunk/interfaces_ppb_public_dev.h +++ b/ppapi/thunk/interfaces_ppb_public_dev.h @@ -12,8 +12,6 @@ PROXIED_IFACE(PPB_Instance, "PPB_Console(Dev);0.1", PPB_Console_1_0) PROXIED_IFACE(NoAPIName, PPB_CURSOR_CONTROL_DEV_INTERFACE_0_4, PPB_CursorControl_Dev_0_4) -PROXIED_IFACE(NoAPIName, PPB_EXT_ALARMS_DEV_INTERFACE_0_1, - PPB_Ext_Alarms_Dev_0_1) PROXIED_IFACE(NoAPIName, PPB_EXT_SOCKET_DEV_INTERFACE_0_1, PPB_Ext_Socket_Dev_0_1) PROXIED_IFACE(NoAPIName, PPB_EXT_SOCKET_DEV_INTERFACE_0_2, diff --git a/ppapi/thunk/ppb_ext_alarms_thunk.cc b/ppapi/thunk/ppb_ext_alarms_thunk.cc deleted file mode 100644 index 2fc88d0..0000000 --- a/ppapi/thunk/ppb_ext_alarms_thunk.cc +++ /dev/null @@ -1,95 +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. - -#include <vector> - -#include "ppapi/c/extensions/dev/ppb_ext_alarms_dev.h" -#include "ppapi/shared_impl/tracked_callback.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/extensions_common_api.h" -#include "ppapi/thunk/thunk.h" - -namespace ppapi { -namespace thunk { - -namespace { - -void Create(PP_Instance instance, - PP_Var name, - PP_Ext_Alarms_AlarmCreateInfo_Dev alarm_info) { - EnterInstanceAPI<ExtensionsCommon_API> enter(instance); - if (enter.failed()) - return; - - std::vector<PP_Var> args; - args.push_back(name); - args.push_back(alarm_info); - enter.functions()->PostRenderer("alarms.create", args); -} - -int32_t Get(PP_Instance instance, - PP_Var name, - PP_Ext_Alarms_Alarm_Dev* alarm, - PP_CompletionCallback callback) { - EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback); - if (enter.failed()) - return enter.retval(); - - std::vector<PP_Var> input_args; - std::vector<PP_Var*> output_args; - input_args.push_back(name); - output_args.push_back(alarm); - return enter.SetResult(enter.functions()->CallRenderer( - "alarms.get", input_args, output_args, enter.callback())); -} - -int32_t GetAll(PP_Instance instance, - PP_Ext_Alarms_Alarm_Dev_Array* alarms, - PP_CompletionCallback callback) { - EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback); - if (enter.failed()) - return enter.retval(); - - std::vector<PP_Var> input_args; - std::vector<PP_Var*> output_args; - output_args.push_back(alarms); - return enter.SetResult(enter.functions()->CallRenderer( - "alarms.getAll", input_args, output_args, enter.callback())); -} - -void Clear(PP_Instance instance, PP_Var name) { - EnterInstanceAPI<ExtensionsCommon_API> enter(instance); - if (enter.failed()) - return; - - std::vector<PP_Var> args; - args.push_back(name); - enter.functions()->PostRenderer("alarms.clear", args); -} - -void ClearAll(PP_Instance instance) { - EnterInstanceAPI<ExtensionsCommon_API> enter(instance); - if (enter.failed()) - return; - - std::vector<PP_Var> args; - enter.functions()->PostRenderer("alarms.clearAll", args); -} - -const PPB_Ext_Alarms_Dev_0_1 g_ppb_ext_alarms_dev_0_1_thunk = { - &Create, - &Get, - &GetAll, - &Clear, - &ClearAll -}; - -} // namespace - -const PPB_Ext_Alarms_Dev_0_1* GetPPB_Ext_Alarms_Dev_0_1_Thunk() { - return &g_ppb_ext_alarms_dev_0_1_thunk; -} - -} // namespace thunk -} // namespace ppapi |