diff options
author | polina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-30 21:42:37 +0000 |
---|---|---|
committer | polina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-30 21:42:37 +0000 |
commit | 917e86adc3f824f518c999dcba20bfd4cbf18a18 (patch) | |
tree | 52fe38f61527360231c17a905015066fb5d34bba /ppapi/c | |
parent | 9ae7b9195f0e06b64664bba52e9cc0e8b3470f56 (diff) | |
download | chromium_src-917e86adc3f824f518c999dcba20bfd4cbf18a18.zip chromium_src-917e86adc3f824f518c999dcba20bfd4cbf18a18.tar.gz chromium_src-917e86adc3f824f518c999dcba20bfd4cbf18a18.tar.bz2 |
Add a flag field to PP_CompletionCallback to control if the callback should
always be invoked asynchronously on success or error or skipped if the
operation can complete synchronously without blocking. Keep the default
behavior as-is until clients update their code. Bump revisions of all
interfaces that take callbacks as args. Update browser interface function
implementations and C++ layer to force callbacks if sync option is not set.
Change ppapi/tests to run tests involving callbacks with both flag options.
BUG=79376
TEST=ppapi_tests + bots
Review URL: http://codereview.chromium.org/6899055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/dev/ppb_directory_reader_dev.h | 7 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_file_chooser_dev.h | 6 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_file_io_dev.h | 7 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_file_io_trusted_dev.h | 7 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_file_ref_dev.h | 5 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_file_system_dev.h | 5 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_graphics_3d_dev.h | 5 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_layer_compositor_dev.h | 4 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_surface_3d_dev.h | 6 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_transport_dev.h | 4 | ||||
-rw-r--r-- | ppapi/c/pp_completion_callback.h | 126 | ||||
-rw-r--r-- | ppapi/c/ppb_core.h | 7 | ||||
-rw-r--r-- | ppapi/c/ppb_file_io.h | 5 | ||||
-rw-r--r-- | ppapi/c/ppb_file_ref.h | 5 | ||||
-rw-r--r-- | ppapi/c/ppb_file_system.h | 4 | ||||
-rw-r--r-- | ppapi/c/ppb_graphics_2d.h | 7 | ||||
-rw-r--r-- | ppapi/c/ppb_url_loader.h | 5 | ||||
-rw-r--r-- | ppapi/c/private/ppb_flash_menu.h | 2 | ||||
-rw-r--r-- | ppapi/c/private/ppb_flash_net_connector.h | 2 | ||||
-rw-r--r-- | ppapi/c/trusted/ppb_audio_trusted.h | 3 | ||||
-rw-r--r-- | ppapi/c/trusted/ppb_broker_trusted.h | 2 | ||||
-rw-r--r-- | ppapi/c/trusted/ppb_file_io_trusted.h | 5 |
22 files changed, 146 insertions, 83 deletions
diff --git a/ppapi/c/dev/ppb_directory_reader_dev.h b/ppapi/c/dev/ppb_directory_reader_dev.h index 41b7299..94e1e12 100644 --- a/ppapi/c/dev/ppb_directory_reader_dev.h +++ b/ppapi/c/dev/ppb_directory_reader_dev.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 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. */ @@ -19,8 +19,8 @@ struct PP_DirectoryEntry_Dev { }; PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DirectoryEntry_Dev, 8); -#define PPB_DIRECTORYREADER_DEV_INTERFACE_0_4 "PPB_DirectoryReader(Dev);0.4" -#define PPB_DIRECTORYREADER_DEV_INTERFACE PPB_DIRECTORYREADER_DEV_INTERFACE_0_4 +#define PPB_DIRECTORYREADER_DEV_INTERFACE_0_5 "PPB_DirectoryReader(Dev);0.5" +#define PPB_DIRECTORYREADER_DEV_INTERFACE PPB_DIRECTORYREADER_DEV_INTERFACE_0_5 struct PPB_DirectoryReader_Dev { // Creates a DirectoryReader for the given directory. Upon success, the @@ -56,4 +56,3 @@ struct PPB_DirectoryReader_Dev { }; #endif /* PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ */ - diff --git a/ppapi/c/dev/ppb_file_chooser_dev.h b/ppapi/c/dev/ppb_file_chooser_dev.h index e0c010f..27080fe 100644 --- a/ppapi/c/dev/ppb_file_chooser_dev.h +++ b/ppapi/c/dev/ppb_file_chooser_dev.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 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. */ @@ -31,8 +31,8 @@ struct PP_FileChooserOptions_Dev { const char* accept_mime_types; }; -#define PPB_FILECHOOSER_DEV_INTERFACE_0_3 "PPB_FileChooser(Dev);0.3" -#define PPB_FILECHOOSER_DEV_INTERFACE PPB_FILECHOOSER_DEV_INTERFACE_0_3 +#define PPB_FILECHOOSER_DEV_INTERFACE_0_4 "PPB_FileChooser(Dev);0.4" +#define PPB_FILECHOOSER_DEV_INTERFACE PPB_FILECHOOSER_DEV_INTERFACE_0_4 struct PPB_FileChooser_Dev { // Creates a file chooser dialog with the specified options. The chooser is diff --git a/ppapi/c/dev/ppb_file_io_dev.h b/ppapi/c/dev/ppb_file_io_dev.h index 0b08712..4ffd282 100644 --- a/ppapi/c/dev/ppb_file_io_dev.h +++ b/ppapi/c/dev/ppb_file_io_dev.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 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. */ @@ -39,8 +39,8 @@ typedef enum { } PP_FileOpenFlags_Dev; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileOpenFlags_Dev, 4); -#define PPB_FILEIO_DEV_INTERFACE_0_3 "PPB_FileIO(Dev);0.3" -#define PPB_FILEIO_DEV_INTERFACE PPB_FILEIO_DEV_INTERFACE_0_3 +#define PPB_FILEIO_DEV_INTERFACE_0_4 "PPB_FileIO(Dev);0.4" +#define PPB_FILEIO_DEV_INTERFACE PPB_FILEIO_DEV_INTERFACE_0_4 // Use this interface to operate on a regular file (PP_FileType_Regular). struct PPB_FileIO_Dev { @@ -117,4 +117,3 @@ struct PPB_FileIO_Dev { }; #endif /* PPAPI_C_DEV_PPB_FILE_IO_DEV_H_ */ - diff --git a/ppapi/c/dev/ppb_file_io_trusted_dev.h b/ppapi/c/dev/ppb_file_io_trusted_dev.h index d3f7c38..ed73a6c 100644 --- a/ppapi/c/dev/ppb_file_io_trusted_dev.h +++ b/ppapi/c/dev/ppb_file_io_trusted_dev.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 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. */ @@ -10,8 +10,8 @@ struct PP_CompletionCallback; -#define PPB_FILEIOTRUSTED_DEV_INTERFACE_0_2 "PPB_FileIOTrusted(Dev);0.2" -#define PPB_FILEIOTRUSTED_DEV_INTERFACE PPB_FILEIOTRUSTED_DEV_INTERFACE_0_2 +#define PPB_FILEIOTRUSTED_DEV_INTERFACE_0_3 "PPB_FileIOTrusted(Dev);0.3" +#define PPB_FILEIOTRUSTED_DEV_INTERFACE PPB_FILEIOTRUSTED_DEV_INTERFACE_0_3 // Available only to trusted implementations. struct PPB_FileIOTrusted_Dev { @@ -45,4 +45,3 @@ struct PPB_FileIOTrusted_Dev { }; #endif /* PPAPI_C_DEV_PPB_FILE_IO_TRUSTED_DEV_H_ */ - diff --git a/ppapi/c/dev/ppb_file_ref_dev.h b/ppapi/c/dev/ppb_file_ref_dev.h index 61e60dc..05b3d9c 100644 --- a/ppapi/c/dev/ppb_file_ref_dev.h +++ b/ppapi/c/dev/ppb_file_ref_dev.h @@ -13,8 +13,8 @@ struct PP_CompletionCallback; -#define PPB_FILEREF_DEV_INTERFACE_0_7 "PPB_FileRef(Dev);0.7" -#define PPB_FILEREF_DEV_INTERFACE PPB_FILEREF_DEV_INTERFACE_0_7 +#define PPB_FILEREF_DEV_INTERFACE_0_8 "PPB_FileRef(Dev);0.8" +#define PPB_FILEREF_DEV_INTERFACE PPB_FILEREF_DEV_INTERFACE_0_8 // A FileRef is a "weak pointer" to a file in a file system. It contains a // PP_FileSystemType identifier and a file path string. @@ -79,4 +79,3 @@ struct PPB_FileRef_Dev { }; #endif /* PPAPI_C_DEV_PPB_FILE_REF_DEV_H_ */ - diff --git a/ppapi/c/dev/ppb_file_system_dev.h b/ppapi/c/dev/ppb_file_system_dev.h index f64236c..ba1e517 100644 --- a/ppapi/c/dev/ppb_file_system_dev.h +++ b/ppapi/c/dev/ppb_file_system_dev.h @@ -14,8 +14,8 @@ struct PP_CompletionCallback; -#define PPB_FILESYSTEM_DEV_INTERFACE_0_5 "PPB_FileSystem(Dev);0.5" -#define PPB_FILESYSTEM_DEV_INTERFACE PPB_FILESYSTEM_DEV_INTERFACE_0_5 +#define PPB_FILESYSTEM_DEV_INTERFACE_0_6 "PPB_FileSystem(Dev);0.6" +#define PPB_FILESYSTEM_DEV_INTERFACE PPB_FILESYSTEM_DEV_INTERFACE_0_6 struct PPB_FileSystem_Dev { /** Creates a filesystem object of the given type. */ @@ -45,4 +45,3 @@ struct PPB_FileSystem_Dev { }; #endif /* PPAPI_C_DEV_PPB_FILE_SYSTEM_DEV_H_ */ - diff --git a/ppapi/c/dev/ppb_graphics_3d_dev.h b/ppapi/c/dev/ppb_graphics_3d_dev.h index 63826c8..6e53328 100644 --- a/ppapi/c/dev/ppb_graphics_3d_dev.h +++ b/ppapi/c/dev/ppb_graphics_3d_dev.h @@ -31,8 +31,8 @@ // // Shutdown. // core->ReleaseResource(context); -#define PPB_GRAPHICS_3D_DEV_INTERFACE_0_4 "PPB_Graphics3D(Dev);0.4" -#define PPB_GRAPHICS_3D_DEV_INTERFACE PPB_GRAPHICS_3D_DEV_INTERFACE_0_4 +#define PPB_GRAPHICS_3D_DEV_INTERFACE_0_5 "PPB_Graphics3D(Dev);0.5" +#define PPB_GRAPHICS_3D_DEV_INTERFACE PPB_GRAPHICS_3D_DEV_INTERFACE_0_5 struct PPB_Graphics3D_Dev { // TODO(alokp): Do these functions need module argument? @@ -226,4 +226,3 @@ struct PPB_Graphics3D_Dev { }; #endif /* PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ */ - diff --git a/ppapi/c/dev/ppb_layer_compositor_dev.h b/ppapi/c/dev/ppb_layer_compositor_dev.h index 1ee4594..1d3ee37 100644 --- a/ppapi/c/dev/ppb_layer_compositor_dev.h +++ b/ppapi/c/dev/ppb_layer_compositor_dev.h @@ -11,7 +11,9 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_size.h" -#define PPB_LAYER_COMPOSITOR_DEV_INTERFACE "PPB_LayerCompositor(Dev);0.1" +#define PPB_LAYER_COMPOSITOR_DEV_INTERFACE_0_2 "PPB_LayerCompositor(Dev);0.2" +#define PPB_LAYER_COMPOSITOR_DEV_INTERFACE \ + PPB_LAYER_COMPOSITOR_DEV_INTERFACE_0_2 // PPB_LayerCompositor allows multiple layers of PPB_Surface3D and // PPB_VideoLayer be bound to a plugin instance. diff --git a/ppapi/c/dev/ppb_surface_3d_dev.h b/ppapi/c/dev/ppb_surface_3d_dev.h index 1eb5057..47b47ef 100644 --- a/ppapi/c/dev/ppb_surface_3d_dev.h +++ b/ppapi/c/dev/ppb_surface_3d_dev.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 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. */ @@ -12,8 +12,8 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" -#define PPB_SURFACE_3D_DEV_INTERFACE_0_1 "PPB_Surface3D(Dev);0.1" -#define PPB_SURFACE_3D_DEV_INTERFACE PPB_SURFACE_3D_DEV_INTERFACE_0_1 +#define PPB_SURFACE_3D_DEV_INTERFACE_0_2 "PPB_Surface3D(Dev);0.2" +#define PPB_SURFACE_3D_DEV_INTERFACE PPB_SURFACE_3D_DEV_INTERFACE_0_2 struct PPB_Surface3D_Dev { // Creates a render surface and returns a handle to it. diff --git a/ppapi/c/dev/ppb_transport_dev.h b/ppapi/c/dev/ppb_transport_dev.h index 5b303e2..bc3a8cd 100644 --- a/ppapi/c/dev/ppb_transport_dev.h +++ b/ppapi/c/dev/ppb_transport_dev.h @@ -13,8 +13,8 @@ #include "ppapi/c/pp_stdint.h" #include "ppapi/c/pp_var.h" -#define PPB_TRANSPORT_DEV_INTERFACE_0_4 "PPB_Transport;0.4" -#define PPB_TRANSPORT_DEV_INTERFACE PPB_TRANSPORT_DEV_INTERFACE_0_4 +#define PPB_TRANSPORT_DEV_INTERFACE_0_5 "PPB_Transport;0.5" +#define PPB_TRANSPORT_DEV_INTERFACE PPB_TRANSPORT_DEV_INTERFACE_0_5 struct PPB_Transport_Dev { // Creates a new transport object with the specified name using the diff --git a/ppapi/c/pp_completion_callback.h b/ppapi/c/pp_completion_callback.h index 248dedc..bc7074a 100644 --- a/ppapi/c/pp_completion_callback.h +++ b/ppapi/c/pp_completion_callback.h @@ -21,8 +21,15 @@ */ /** - * PP_CompletionCallback_Func defines the signature that you implement to - * receive callbacks on asynchronous completion. + * PP_CompletionCallback_Func defines the function signature that you implement + * to receive callbacks on asynchronous completion of an operation. + * + * |user_data| is a pointer to user-specified data associated with this + * function at callback creation. See PP_MakeCompletionCallback() for details. + * + * |result| is the result of the operation. Non-positive values correspond to + * the error codes from pp_errors.h (excluding PP_OK_COMPLETIONPENDING). + * Positive values indicate additional information such as bytes read. */ typedef void (*PP_CompletionCallback_Func)(void* user_data, int32_t result); /** @@ -30,28 +37,61 @@ typedef void (*PP_CompletionCallback_Func)(void* user_data, int32_t result); */ /** + * + * @addtogroup Enums + * @{ + */ + +/** + * This enumeration contains flags used to control how non-NULL callbacks are + * scheduled by asynchronous methods. + */ +typedef enum { + /** + * This flag allows any non-NULL callback to be always invoked asynchronously, + * on success or error, even if the operation could complete synchronously + * without blocking. + * + * The method taking such callback will always return PP_OK_COMPLETIONPENDING. + * The callback will be invoked on the main thread of PPAPI execution. + * + * TODO(polina): make this the default once all the clients use flags. + */ + PP_COMPLETIONCALLBACK_FLAG_NONE = 0 << 0, + /** + * This flag allows any method taking such callback to complete synchronously + * and not call the callback if the operation would not block. This is useful + * when performance is an issue, and the operation bandwidth should not be + * limited to the processing speed of the message loop. + * + * On synchronous method completion, the completion result will be returned + * by the method itself. Otherwise, the method will return + * PP_OK_COMPLETIONPENDING, and the callback will be invoked asynchronously on + * the main thread of PPAPI execution. + */ + PP_COMPLETIONCALLBACK_FLAG_OPTIONAL = 1 << 0 +} PP_CompletionCallback_Flag; +PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CompletionCallback_Flag, 4); + + +/** * @addtogroup Structs * @{ */ /** - * Any method that takes a PP_CompletionCallback has the option of completing - * asynchronously if the operation would block. Such a method should return - * PP_OK_COMPLETIONPENDING to indicate that the method will complete - * asynchronously and will always be invoked from the main thread of PPAPI - * execution. If the completion callback is NULL, then the operation will - * block if necessary to complete its work. PP_BlockUntilComplete() provides a - * convenient way to specify blocking behavior. Refer to PP_BlockUntilComplete - * for more information. + * Any method that takes a PP_CompletionCallback can complete asynchronously. + * Refer to PP_CompletionCallback_Flag for more information. * - * The result parameter passes an int32_t that, if negative or equal to 0, - * indicate if the call will completely asynchronously (the callback will be - * called with a status code). A value greater than zero indicates additional - * information such as bytes read. + * If PP_CompletionCallback_Func is NULL, the operation might block if necessary + * to complete the work. Refer to PP_BlockUntilComplete for more information. + * + * See PP_MakeCompletionCallback() for the description of each field. */ struct PP_CompletionCallback { PP_CompletionCallback_Func func; void* user_data; + int32_t flags; }; /** * @} @@ -61,14 +101,20 @@ struct PP_CompletionCallback { * @addtogroup Functions * @{ */ - /** - * PP_MakeCompletionCallback() is used to create a PP_CompletionCallback. + * PP_MakeCompletionCallback() is used to create a PP_CompletionCallback + * without flags. If you want to alter the default callback behavior, set the + * flags to a bit field combination of PP_CompletionCallback_Flag's. + * + * Example: + * struct PP_CompletionCallback cc = PP_MakeCompletionCallback(Foo, NULL); + * cc.flags = cc.flags | PP_COMPLETIONCALLBACK_FLAG_OPTIONAL; + * + * @param[in] func A PP_CompletionCallback_Func to be called on completion. + * @param[in] user_data A pointer to user data passed to be passed to the + * callback function. This is optional and is typically used to help track state + * in case of multiple pending callbacks. * - * @param[in] func A PP_CompletionCallback_Func that will be called. - * @param[in] user_data A pointer to user data passed to your callback - * function. This is optional and is typically used to help track state - * when you may have multiple callbacks pending. * @return A PP_CompletionCallback structure. */ PP_INLINE struct PP_CompletionCallback PP_MakeCompletionCallback( @@ -77,6 +123,27 @@ PP_INLINE struct PP_CompletionCallback PP_MakeCompletionCallback( struct PP_CompletionCallback cc; cc.func = func; cc.user_data = user_data; + /* TODO(polina): switch the default to PP_COMPLETIONCALLBACK_FLAG_NONE. */ + cc.flags = PP_COMPLETIONCALLBACK_FLAG_OPTIONAL; + return cc; +} + +/** + * PP_MakeOptionalCompletionCallback() is used to create a PP_CompletionCallback + * with PP_COMPLETIONCALLBACK_FLAG_OPTIONAL set. + * + * @param[in] func A PP_CompletionCallback_Func to be called on completion. + * @param[in] user_data A pointer to user data passed to be passed to the + * callback function. This is optional and is typically used to help track state + * in case of multiple pending callbacks. + * + * @return A PP_CompletionCallback structure. + */ +PP_INLINE struct PP_CompletionCallback PP_MakeOptionalCompletionCallback( + PP_CompletionCallback_Func func, + void* user_data) { + struct PP_CompletionCallback cc = PP_MakeCompletionCallback(func, user_data); + cc.flags = cc.flags | PP_COMPLETIONCALLBACK_FLAG_OPTIONAL; return cc; } /** @@ -89,17 +156,18 @@ PP_INLINE struct PP_CompletionCallback PP_MakeCompletionCallback( */ /** - * PP_RunCompletionCallback() is used to run a callback. + * PP_RunCompletionCallback() is used to run a callback. It invokes + * the callback function passing it user data specified on creation and + * completion |result|. * * @param[in] cc A pointer to a PP_CompletionCallback that will be run. - * @param[in] res The result parameter that, if negative or equal to 0, - * indicate if the call will completely asynchronously (the callback will be - * called with a status code). A value greater than zero indicates additional - * information such as bytes read. + * @param[in] result The result of the operation. Non-positive values correspond + * to the error codes from pp_errors.h (excluding PP_OK_COMPLETIONPENDING). + * Positive values indicate additional information such as bytes read. */ PP_INLINE void PP_RunCompletionCallback(struct PP_CompletionCallback* cc, - int32_t res) { - cc->func(cc->user_data, res); + int32_t result) { + cc->func(cc->user_data, result); } /** @@ -114,10 +182,10 @@ PP_INLINE void PP_RunCompletionCallback(struct PP_CompletionCallback* cc, /** * PP_BlockUntilComplete() is used in place of an actual completion callback * to request blocking behavior. If specified, the calling thread will block - * until the function completes. Blocking completion callbacks are only usable + * until the function completes. Blocking completion callbacks are only allowed * from background threads. * - * @return A PP_CompletionCallback structure. + * @return A PP_CompletionCallback structure corresponding to a NULL callback. */ PP_INLINE struct PP_CompletionCallback PP_BlockUntilComplete() { return PP_MakeCompletionCallback(NULL, NULL); diff --git a/ppapi/c/ppb_core.h b/ppapi/c/ppb_core.h index ac7b8f4..968dfcd 100644 --- a/ppapi/c/ppb_core.h +++ b/ppapi/c/ppb_core.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 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. */ @@ -13,8 +13,8 @@ struct PP_CompletionCallback; -#define PPB_CORE_INTERFACE_0_4 "PPB_Core;0.4" -#define PPB_CORE_INTERFACE PPB_CORE_INTERFACE_0_4 +#define PPB_CORE_INTERFACE_0_5 "PPB_Core;0.5" +#define PPB_CORE_INTERFACE PPB_CORE_INTERFACE_0_5 /** * @file @@ -139,4 +139,3 @@ struct PPB_Core { #endif /* PPAPI_C_DEV_PPB_CORE_DEV_H_ */ - diff --git a/ppapi/c/ppb_file_io.h b/ppapi/c/ppb_file_io.h index 0f274db..92ad35b 100644 --- a/ppapi/c/ppb_file_io.h +++ b/ppapi/c/ppb_file_io.h @@ -39,8 +39,8 @@ typedef enum { } PP_FileOpenFlags; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileOpenFlags, 4); -#define PPB_FILEIO_INTERFACE_0_4 "PPB_FileIO;0.4" -#define PPB_FILEIO_INTERFACE PPB_FILEIO_INTERFACE_0_4 +#define PPB_FILEIO_INTERFACE_0_5 "PPB_FileIO;0.5" +#define PPB_FILEIO_INTERFACE PPB_FILEIO_INTERFACE_0_5 // Use this interface to operate on a regular file (PP_FileType_Regular). struct PPB_FileIO { @@ -117,3 +117,4 @@ struct PPB_FileIO { }; #endif /* PPAPI_C_PPB_FILE_IO_H_ */ + diff --git a/ppapi/c/ppb_file_ref.h b/ppapi/c/ppb_file_ref.h index 3f6faf7..4813d1a 100644 --- a/ppapi/c/ppb_file_ref.h +++ b/ppapi/c/ppb_file_ref.h @@ -13,8 +13,8 @@ struct PP_CompletionCallback; -#define PPB_FILEREF_INTERFACE_0_8 "PPB_FileRef;0.8" -#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_0_8 +#define PPB_FILEREF_INTERFACE_0_9 "PPB_FileRef;0.9" +#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_0_9 // A FileRef is a "weak pointer" to a file in a file system. It contains a // PP_FileSystemType identifier and a file path string. @@ -79,3 +79,4 @@ struct PPB_FileRef { }; #endif /* PPAPI_C_PPB_FILE_REF_H_ */ + diff --git a/ppapi/c/ppb_file_system.h b/ppapi/c/ppb_file_system.h index 692aa9c..07f1f78 100644 --- a/ppapi/c/ppb_file_system.h +++ b/ppapi/c/ppb_file_system.h @@ -14,8 +14,8 @@ struct PP_CompletionCallback; -#define PPB_FILESYSTEM_INTERFACE_0_6 "PPB_FileSystem;0.6" -#define PPB_FILESYSTEM_INTERFACE PPB_FILESYSTEM_INTERFACE_0_6 +#define PPB_FILESYSTEM_INTERFACE_0_7 "PPB_FileSystem;0.7" +#define PPB_FILESYSTEM_INTERFACE PPB_FILESYSTEM_INTERFACE_0_7 struct PPB_FileSystem { /** Creates a filesystem object of the given type. */ diff --git a/ppapi/c/ppb_graphics_2d.h b/ppapi/c/ppb_graphics_2d.h index b08e9fc..d32ef5d 100644 --- a/ppapi/c/ppb_graphics_2d.h +++ b/ppapi/c/ppb_graphics_2d.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 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. */ @@ -16,8 +16,8 @@ struct PP_Point; struct PP_Rect; struct PP_Size; -#define PPB_GRAPHICS_2D_INTERFACE_0_3 "PPB_Graphics2D;0.3" -#define PPB_GRAPHICS_2D_INTERFACE PPB_GRAPHICS_2D_INTERFACE_0_3 +#define PPB_GRAPHICS_2D_INTERFACE_0_4 "PPB_Graphics2D;0.4" +#define PPB_GRAPHICS_2D_INTERFACE PPB_GRAPHICS_2D_INTERFACE_0_4 /** * @file @@ -231,4 +231,3 @@ struct PPB_Graphics2D { * @} */ #endif /* PPAPI_C_PPB_GRAPHICS_2D_H_ */ - diff --git a/ppapi/c/ppb_url_loader.h b/ppapi/c/ppb_url_loader.h index 6ff753b..afbee22 100644 --- a/ppapi/c/ppb_url_loader.h +++ b/ppapi/c/ppb_url_loader.h @@ -12,8 +12,8 @@ struct PP_CompletionCallback; -#define PPB_URLLOADER_INTERFACE_0_1 "PPB_URLLoader;0.1" -#define PPB_URLLOADER_INTERFACE PPB_URLLOADER_INTERFACE_0_1 +#define PPB_URLLOADER_INTERFACE_0_2 "PPB_URLLoader;0.2" +#define PPB_URLLOADER_INTERFACE PPB_URLLOADER_INTERFACE_0_2 /** * @file @@ -216,4 +216,3 @@ struct PPB_URLLoader { */ #endif /* PPAPI_C_PPB_URL_LOADER_H_ */ - diff --git a/ppapi/c/private/ppb_flash_menu.h b/ppapi/c/private/ppb_flash_menu.h index 7fc62e5..d7cbf4d 100644 --- a/ppapi/c/private/ppb_flash_menu.h +++ b/ppapi/c/private/ppb_flash_menu.h @@ -10,7 +10,7 @@ #include "ppapi/c/pp_point.h" #include "ppapi/c/pp_resource.h" -#define PPB_FLASH_MENU_INTERFACE "PPB_Flash_Menu;1" +#define PPB_FLASH_MENU_INTERFACE "PPB_Flash_Menu;0.2" struct PP_CompletionCallback; diff --git a/ppapi/c/private/ppb_flash_net_connector.h b/ppapi/c/private/ppb_flash_net_connector.h index 2cc25bb..9f342fc 100644 --- a/ppapi/c/private/ppb_flash_net_connector.h +++ b/ppapi/c/private/ppb_flash_net_connector.h @@ -10,7 +10,7 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/private/ppb_flash_file.h" // For |PP_FileHandle|. -#define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;0.1" +#define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;0.2" // This is an opaque type holding a network address. struct PP_Flash_NetAddress { diff --git a/ppapi/c/trusted/ppb_audio_trusted.h b/ppapi/c/trusted/ppb_audio_trusted.h index 49c947c..cac02f2 100644 --- a/ppapi/c/trusted/ppb_audio_trusted.h +++ b/ppapi/c/trusted/ppb_audio_trusted.h @@ -9,7 +9,7 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" -#define PPB_AUDIO_TRUSTED_INTERFACE "PPB_AudioTrusted;0.5" +#define PPB_AUDIO_TRUSTED_INTERFACE "PPB_AudioTrusted;0.6" /** * This interface is to be used by proxy implementations. All @@ -47,4 +47,3 @@ struct PPB_AudioTrusted { }; #endif /* PPAPI_C_PPB_AUDIO_TRUSTED_H_ */ - diff --git a/ppapi/c/trusted/ppb_broker_trusted.h b/ppapi/c/trusted/ppb_broker_trusted.h index 84fb924..5cf091f 100644 --- a/ppapi/c/trusted/ppb_broker_trusted.h +++ b/ppapi/c/trusted/ppb_broker_trusted.h @@ -10,7 +10,7 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" -#define PPB_BROKER_TRUSTED_INTERFACE "PPB_BrokerTrusted;0.1" +#define PPB_BROKER_TRUSTED_INTERFACE "PPB_BrokerTrusted;0.2" /** * @file diff --git a/ppapi/c/trusted/ppb_file_io_trusted.h b/ppapi/c/trusted/ppb_file_io_trusted.h index 44e6e43..766ed3f 100644 --- a/ppapi/c/trusted/ppb_file_io_trusted.h +++ b/ppapi/c/trusted/ppb_file_io_trusted.h @@ -10,8 +10,8 @@ struct PP_CompletionCallback; -#define PPB_FILEIOTRUSTED_INTERFACE_0_3 "PPB_FileIOTrusted;0.3" -#define PPB_FILEIOTRUSTED_INTERFACE PPB_FILEIOTRUSTED_INTERFACE_0_3 +#define PPB_FILEIOTRUSTED_INTERFACE_0_4 "PPB_FileIOTrusted;0.4" +#define PPB_FILEIOTRUSTED_INTERFACE PPB_FILEIOTRUSTED_INTERFACE_0_4 // Available only to trusted implementations. struct PPB_FileIOTrusted { @@ -45,3 +45,4 @@ struct PPB_FileIOTrusted { }; #endif /* PPAPI_C_PPB_FILE_IO_TRUSTED_H_ */ + |