Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Issue 6102007: Update NPAPI headers to r32 from the upstream npapi-headers repository (Closed)

Created:
9 years, 11 months ago by stuartmorgan
Modified:
9 years, 7 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, stuartmorgan
Visibility:
Public.

Description

Update NPAPI headers to r32 from the upstream npapi-headers repository This adds the new data-clearing APIs. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70821

Patch Set 1 #

Patch Set 2 : Add nptypes.h changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -4 lines) Patch
M third_party/npapi/bindings/npapi.h View 6 chunks +15 lines, -2 lines 0 comments Download
M third_party/npapi/bindings/npfunctions.h View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/npapi/bindings/nptypes.h View 1 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
stuartmorgan
9 years, 11 months ago (2011-01-07 20:32:27 UTC) #1
Bernhard Bauer
9 years, 11 months ago (2011-01-08 00:21:58 UTC) #2
LGTM.

On Friday, January 7, 2011,  <stuartmorgan@chromium.org> wrote:
> Reviewers: Bernhard Bauer,
>
> Description:
> Update NPAPI headers to r32 from the upstream npapi-headers repository
>
> This adds the new data-clearing APIs.
>
> BUG=None
> TEST=None
>
> Please review this at http://codereview.chromium.org/6102007/
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src
>
> Affected files:
>   M third_party/npapi/bindings/npapi.h
>   M third_party/npapi/bindings/npfunctions.h
>   M third_party/npapi/bindings/nptypes.h
>
>
> Index: third_party/npapi/bindings/npapi.h
> diff --git a/third_party/npapi/bindings/npapi.h
b/third_party/npapi/bindings/npapi.h
> index
e7bd1cf8d682663fff5c68593df807b69e13962c..6058321c8dda520324de0380436ad5443e8613b3
100644
> --- a/third_party/npapi/bindings/npapi.h
> +++ b/third_party/npapi/bindings/npapi.h
> @@ -90,7 +90,9 @@
>  #endif
>
>  #if defined(__APPLE_CC__) && !defined(XP_UNIX)
> -#define XP_MACOSX
> +#ifndef XP_MACOSX
> +#define XP_MACOSX 1
> +#endif
>  #endif
>
>  #if defined(XP_MACOSX) && defined(__LP64__)
> @@ -130,7 +132,7 @@
>  /*----------------------------------------------------------------------*/
>
>  #define NP_VERSION_MAJOR 0
> -#define NP_VERSION_MINOR 26
> +#define NP_VERSION_MINOR 27
>
>
>  /* The OS/2 version of Netscape uses RC_DATA to define the
> @@ -719,6 +721,12 @@ enum NPEventType {
>
>  #define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
>
> +/*
> + * Flags for NPP_ClearSiteData.
> + */
> +#define NP_CLEAR_ALL   0
> +#define NP_CLEAR_CACHE (1 << 0)
> +
>  #if !defined(__LP64__)
>  #if defined(XP_MACOSX)
>  #pragma options align=reset
> @@ -747,6 +755,8 @@ enum NPEventType {
>  #define NPERR_FILE_NOT_FOUND              (NPERR_BASE + 11)
>  #define NPERR_NO_DATA                     (NPERR_BASE + 12)
>  #define NPERR_STREAM_NOT_SEEKABLE         (NPERR_BASE + 13)
> +#define NPERR_TIME_RANGE_NOT_SUPPORTED    (NPERR_BASE + 14)
> +#define NPERR_MALFORMED_SITE              (NPERR_BASE + 15)
>
>  /*
>   * Values of type NPReason:
> @@ -784,6 +794,7 @@ enum NPEventType {
>  #define NPVERS_MACOSX_HAS_COCOA_EVENTS      23
>  #define NPVERS_HAS_ADVANCED_KEY_HANDLING    25
>  #define NPVERS_HAS_URL_REDIRECT_HANDLING    26
> +#define NPVERS_HAS_CLEAR_SITE_DATA          27
>
>  /*----------------------------------------------------------------------*/
>  /*                        Function Prototypes                           */
> @@ -831,6 +842,8 @@ NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable
variable, void *value);
>  NPBool  NP_LOADDS NPP_GotFocus(NPP instance, NPFocusDirection direction);
>  void    NP_LOADDS NPP_LostFocus(NPP instance);
>  void    NP_LOADDS NPP_URLRedirectNotify(NPP instance, const char* url,
int32_t status, void* notifyData);
> +NPError NP_LOADDS NPP_ClearSiteData(const char* site, uint64_t flags,
uint64_t maxAge);
> +char**  NP_LOADDS NPP_GetSitesWithData(void);
>
>  /* NPN_* functions are provided by the navigator and called by the plugin. */
>  void        NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
> Index: third_party/npapi/bindings/npfunctions.h
> diff --git a/third_party/npapi/bindings/npfunctions.h
b/third_party/npapi/bindings/npfunctions.h
> index
b479672b2145fda600df9e9b69fe464f995b1229..113fa9c6586be115b18bd488802cd3bb64a9f853
100644
> --- a/third_party/npapi/bindings/npfunctions.h
> +++ b/third_party/npapi/bindings/npfunctions.h
> @@ -68,6 +68,8 @@ typedef NPError      (* NP_LOADDS NPP_SetValueProcPtr)(NPP
instance, NPNVariable
>  typedef NPBool       (* NP_LOADDS NPP_GotFocusPtr)(NPP instance,
NPFocusDirection direction);
>  typedef void         (* NP_LOADDS NPP_LostFocusPtr)(NPP instance);
>  typedef void         (* NP_LOADDS NPP_URLRedirectNotifyPtr)(NPP instance,
const char* url, int32_t status, void* notifyData);
> +typedef NPError      (* NP_LOADDS NPP_ClearSiteDataPtr)(const char* site,
uint64_t flags, uint64_t maxAge);
> +typedef char**       (* NP_LOADDS NPP_GetSitesWithDataPtr)(void);
>
>  typedef NPError      (*NPN_GetValueProcPtr)(NPP instance, NPNVariable
variable, void *ret_value);
>  typedef NPError      (*NPN_SetValueProcPtr)(NPP instance, NPPVariable
variable, void *value);
> @@ -147,6 +149,8 @@ typedef struct _NPPluginFuncs {
>    NPP_GotFocusPtr gotfocus;
>    NPP_LostFocusPtr lostfocus;
>    NPP_URLRedirectNotifyPtr urlredirectnotify;
> +  NPP_ClearSiteDataPtr clearsitedata;
> +  NPP_GetSitesWithDataPtr getsiteswithdata;
>  } NPPluginFuncs;
>
>  typedef struct _NPNetscapeFuncs {
> Index: third_party/npapi/bindings/nptypes.h
> diff --git a/third_party/npapi/bindings/nptypes.h
b/third_party/npapi/bindings/nptypes.h
> index
e8a139173fcb268d2d963a9fe97b761de78c5e76..300128885cc346745bdba87f871674dcfc5e231a
100644
> --- a/third_party/npapi/bindings/nptypes.h
> +++ b/third_party/npapi/bindings/nptypes.h
> @@ -40,19 +40,21 @@
>  #define nptypes_h_
>
>  /*
> - * Header file for ensuring that C99 types ([u]int32_t and bool) and
> + * Header file for ensuring that C99 types ([u]int32_t, [u]int64_t and bool)
and
>   * true/false macros are available.
>   */
>
>  #if defined(WIN32) || defined(OS2)
>    /*
> -   * Win32 and OS/2 don't know C99, so define [u]int_16/32 here. The bool
> +   * Win32 and OS/2 don't know C99, so define [u]int_16/32/64 here. The bool
>     * is predefined tho, both in C and C++.
>     */
>    typedef short int16_t;
>    typedef unsigned short uint16_t;
>    typedef int int32_t;
>    typedef unsigned int uint32_t;
> +  typedef long long int64_t;
> +  typedef unsigned long long uint64_t;
>  #elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) ||
defined(HPUX)
>    /*
>     * AIX and SunOS ship a inttypes.h header that defines [u]int32_t,
> @@ -77,6 +79,7 @@
>     */
>    #if defined(bsdi)
>    typedef u_int32_t uint32_t;
> +  typedef u_int64_t uint64_t;
>
>    #if !defined(__cplusplus)
>      typedef int bool;
>
>
>

Powered by Google App Engine
This is Rietveld 408576698