Enums

Enumerations

enum  PP_Bool { PP_FALSE = 0, PP_TRUE = 1 }
enum  PP_CompletionCallback_Flag { PP_COMPLETIONCALLBACK_FLAG_NONE = 0 << 0, PP_COMPLETIONCALLBACK_FLAG_OPTIONAL = 1 << 0 }
enum  {
  PP_OK = 0, PP_OK_COMPLETIONPENDING = -1, PP_ERROR_FAILED = -2, PP_ERROR_ABORTED = -3,
  PP_ERROR_BADARGUMENT = -4, PP_ERROR_BADRESOURCE = -5, PP_ERROR_NOINTERFACE = -6, PP_ERROR_NOACCESS = -7,
  PP_ERROR_NOMEMORY = -8, PP_ERROR_NOSPACE = -9, PP_ERROR_NOQUOTA = -10, PP_ERROR_INPROGRESS = -11,
  PP_ERROR_NOTSUPPORTED = -12, PP_ERROR_BLOCKS_MAIN_THREAD = -13, PP_ERROR_FILENOTFOUND = -20, PP_ERROR_FILEEXISTS = -21,
  PP_ERROR_FILETOOBIG = -22, PP_ERROR_FILECHANGED = -23, PP_ERROR_NOTAFILE = -24, PP_ERROR_TIMEDOUT = -30,
  PP_ERROR_USERCANCEL = -40, PP_ERROR_NO_USER_GESTURE = -41, PP_ERROR_CONTEXT_LOST = -50, PP_ERROR_NO_MESSAGE_LOOP = -51,
  PP_ERROR_WRONG_THREAD = -52, PP_ERROR_CONNECTION_CLOSED = -100, PP_ERROR_CONNECTION_RESET = -101, PP_ERROR_CONNECTION_REFUSED = -102,
  PP_ERROR_CONNECTION_ABORTED = -103, PP_ERROR_CONNECTION_FAILED = -104, PP_ERROR_CONNECTION_TIMEDOUT = -105, PP_ERROR_ADDRESS_INVALID = -106,
  PP_ERROR_ADDRESS_UNREACHABLE = -107, PP_ERROR_ADDRESS_IN_USE = -108, PP_ERROR_MESSAGE_TOO_BIG = -109, PP_ERROR_NAME_NOT_RESOLVED = -110
}
enum  PP_FileType { PP_FILETYPE_REGULAR = 0, PP_FILETYPE_DIRECTORY = 1, PP_FILETYPE_OTHER = 2 }
enum  PP_FileSystemType {
  PP_FILESYSTEMTYPE_INVALID = 0, PP_FILESYSTEMTYPE_EXTERNAL = 1, PP_FILESYSTEMTYPE_LOCALPERSISTENT = 2, PP_FILESYSTEMTYPE_LOCALTEMPORARY = 3,
  PP_FILESYSTEMTYPE_ISOLATED = 4
}
enum  PP_Graphics3DAttrib {
  PP_GRAPHICS3DATTRIB_ALPHA_SIZE = 0x3021, PP_GRAPHICS3DATTRIB_BLUE_SIZE = 0x3022, PP_GRAPHICS3DATTRIB_GREEN_SIZE = 0x3023, PP_GRAPHICS3DATTRIB_RED_SIZE = 0x3024,
  PP_GRAPHICS3DATTRIB_DEPTH_SIZE = 0x3025, PP_GRAPHICS3DATTRIB_STENCIL_SIZE = 0x3026, PP_GRAPHICS3DATTRIB_SAMPLES = 0x3031, PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS = 0x3032,
  PP_GRAPHICS3DATTRIB_NONE = 0x3038, PP_GRAPHICS3DATTRIB_HEIGHT = 0x3056, PP_GRAPHICS3DATTRIB_WIDTH = 0x3057, PP_GRAPHICS3DATTRIB_SWAP_BEHAVIOR = 0x3093,
  PP_GRAPHICS3DATTRIB_BUFFER_PRESERVED = 0x3094, PP_GRAPHICS3DATTRIB_BUFFER_DESTROYED = 0x3095, PP_GRAPHICS3DATTRIB_GPU_PREFERENCE = 0x11000, PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER = 0x11001,
  PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002
}
enum  PP_VarType {
  PP_VARTYPE_UNDEFINED = 0, PP_VARTYPE_NULL = 1, PP_VARTYPE_BOOL = 2, PP_VARTYPE_INT32 = 3,
  PP_VARTYPE_DOUBLE = 4, PP_VARTYPE_STRING = 5, PP_VARTYPE_OBJECT = 6, PP_VARTYPE_ARRAY = 7,
  PP_VARTYPE_DICTIONARY = 8, PP_VARTYPE_ARRAY_BUFFER = 9, PP_VARTYPE_RESOURCE = 10
}
enum  { PP_AUDIOMINSAMPLEFRAMECOUNT = 64, PP_AUDIOMAXSAMPLEFRAMECOUNT = 32768 }
enum  PP_AudioSampleRate { PP_AUDIOSAMPLERATE_NONE = 0, PP_AUDIOSAMPLERATE_44100 = 44100, PP_AUDIOSAMPLERATE_48000 = 48000 }
enum  PP_LogLevel { PP_LOGLEVEL_TIP = 0, PP_LOGLEVEL_LOG = 1, PP_LOGLEVEL_WARNING = 2, PP_LOGLEVEL_ERROR = 3 }
enum  PP_FileOpenFlags {
  PP_FILEOPENFLAG_READ = 1 << 0, PP_FILEOPENFLAG_WRITE = 1 << 1, PP_FILEOPENFLAG_CREATE = 1 << 2, PP_FILEOPENFLAG_TRUNCATE = 1 << 3,
  PP_FILEOPENFLAG_EXCLUSIVE = 1 << 4, PP_FILEOPENFLAG_APPEND = 1 << 5
}
enum  PP_HostResolver_Flag { PP_HOSTRESOLVER_FLAG_CANONNAME = 1 << 0 }
enum  PP_ImageDataFormat { PP_IMAGEDATAFORMAT_BGRA_PREMUL, PP_IMAGEDATAFORMAT_RGBA_PREMUL }
enum  PP_InputEvent_Type {
  PP_INPUTEVENT_TYPE_UNDEFINED = -1, PP_INPUTEVENT_TYPE_MOUSEDOWN = 0, PP_INPUTEVENT_TYPE_MOUSEUP = 1, PP_INPUTEVENT_TYPE_MOUSEMOVE = 2,
  PP_INPUTEVENT_TYPE_MOUSEENTER = 3, PP_INPUTEVENT_TYPE_MOUSELEAVE = 4, PP_INPUTEVENT_TYPE_WHEEL = 5, PP_INPUTEVENT_TYPE_RAWKEYDOWN = 6,
  PP_INPUTEVENT_TYPE_KEYDOWN = 7, PP_INPUTEVENT_TYPE_KEYUP = 8, PP_INPUTEVENT_TYPE_CHAR = 9, PP_INPUTEVENT_TYPE_CONTEXTMENU = 10,
  PP_INPUTEVENT_TYPE_IME_COMPOSITION_START = 11, PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE = 12, PP_INPUTEVENT_TYPE_IME_COMPOSITION_END = 13, PP_INPUTEVENT_TYPE_IME_TEXT = 14,
  PP_INPUTEVENT_TYPE_TOUCHSTART = 15, PP_INPUTEVENT_TYPE_TOUCHMOVE = 16, PP_INPUTEVENT_TYPE_TOUCHEND = 17, PP_INPUTEVENT_TYPE_TOUCHCANCEL = 18
}
enum  PP_InputEvent_Modifier {
  PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0, PP_INPUTEVENT_MODIFIER_CONTROLKEY = 1 << 1, PP_INPUTEVENT_MODIFIER_ALTKEY = 1 << 2, PP_INPUTEVENT_MODIFIER_METAKEY = 1 << 3,
  PP_INPUTEVENT_MODIFIER_ISKEYPAD = 1 << 4, PP_INPUTEVENT_MODIFIER_ISAUTOREPEAT = 1 << 5, PP_INPUTEVENT_MODIFIER_LEFTBUTTONDOWN = 1 << 6, PP_INPUTEVENT_MODIFIER_MIDDLEBUTTONDOWN = 1 << 7,
  PP_INPUTEVENT_MODIFIER_RIGHTBUTTONDOWN = 1 << 8, PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY = 1 << 9, PP_INPUTEVENT_MODIFIER_NUMLOCKKEY = 1 << 10, PP_INPUTEVENT_MODIFIER_ISLEFT = 1 << 11,
  PP_INPUTEVENT_MODIFIER_ISRIGHT = 1 << 12
}
enum  PP_InputEvent_MouseButton { PP_INPUTEVENT_MOUSEBUTTON_NONE = -1, PP_INPUTEVENT_MOUSEBUTTON_LEFT = 0, PP_INPUTEVENT_MOUSEBUTTON_MIDDLE = 1, PP_INPUTEVENT_MOUSEBUTTON_RIGHT = 2 }
enum  PP_InputEvent_Class {
  PP_INPUTEVENT_CLASS_MOUSE = 1 << 0, PP_INPUTEVENT_CLASS_KEYBOARD = 1 << 1, PP_INPUTEVENT_CLASS_WHEEL = 1 << 2, PP_INPUTEVENT_CLASS_TOUCH = 1 << 3,
  PP_INPUTEVENT_CLASS_IME = 1 << 4
}
enum  PP_TouchListType { PP_TOUCHLIST_TYPE_TOUCHES = 0, PP_TOUCHLIST_TYPE_CHANGEDTOUCHES = 1, PP_TOUCHLIST_TYPE_TARGETTOUCHES = 2 }
enum  PP_MouseCursor_Type {
  PP_MOUSECURSOR_TYPE_CUSTOM = -1, PP_MOUSECURSOR_TYPE_POINTER = 0, PP_MOUSECURSOR_TYPE_CROSS = 1, PP_MOUSECURSOR_TYPE_HAND = 2,
  PP_MOUSECURSOR_TYPE_IBEAM = 3, PP_MOUSECURSOR_TYPE_WAIT = 4, PP_MOUSECURSOR_TYPE_HELP = 5, PP_MOUSECURSOR_TYPE_EASTRESIZE = 6,
  PP_MOUSECURSOR_TYPE_NORTHRESIZE = 7, PP_MOUSECURSOR_TYPE_NORTHEASTRESIZE = 8, PP_MOUSECURSOR_TYPE_NORTHWESTRESIZE = 9, PP_MOUSECURSOR_TYPE_SOUTHRESIZE = 10,
  PP_MOUSECURSOR_TYPE_SOUTHEASTRESIZE = 11, PP_MOUSECURSOR_TYPE_SOUTHWESTRESIZE = 12, PP_MOUSECURSOR_TYPE_WESTRESIZE = 13, PP_MOUSECURSOR_TYPE_NORTHSOUTHRESIZE = 14,
  PP_MOUSECURSOR_TYPE_EASTWESTRESIZE = 15, PP_MOUSECURSOR_TYPE_NORTHEASTSOUTHWESTRESIZE = 16, PP_MOUSECURSOR_TYPE_NORTHWESTSOUTHEASTRESIZE = 17, PP_MOUSECURSOR_TYPE_COLUMNRESIZE = 18,
  PP_MOUSECURSOR_TYPE_ROWRESIZE = 19, PP_MOUSECURSOR_TYPE_MIDDLEPANNING = 20, PP_MOUSECURSOR_TYPE_EASTPANNING = 21, PP_MOUSECURSOR_TYPE_NORTHPANNING = 22,
  PP_MOUSECURSOR_TYPE_NORTHEASTPANNING = 23, PP_MOUSECURSOR_TYPE_NORTHWESTPANNING = 24, PP_MOUSECURSOR_TYPE_SOUTHPANNING = 25, PP_MOUSECURSOR_TYPE_SOUTHEASTPANNING = 26,
  PP_MOUSECURSOR_TYPE_SOUTHWESTPANNING = 27, PP_MOUSECURSOR_TYPE_WESTPANNING = 28, PP_MOUSECURSOR_TYPE_MOVE = 29, PP_MOUSECURSOR_TYPE_VERTICALTEXT = 30,
  PP_MOUSECURSOR_TYPE_CELL = 31, PP_MOUSECURSOR_TYPE_CONTEXTMENU = 32, PP_MOUSECURSOR_TYPE_ALIAS = 33, PP_MOUSECURSOR_TYPE_PROGRESS = 34,
  PP_MOUSECURSOR_TYPE_NODROP = 35, PP_MOUSECURSOR_TYPE_COPY = 36, PP_MOUSECURSOR_TYPE_NONE = 37, PP_MOUSECURSOR_TYPE_NOTALLOWED = 38,
  PP_MOUSECURSOR_TYPE_ZOOMIN = 39, PP_MOUSECURSOR_TYPE_ZOOMOUT = 40, PP_MOUSECURSOR_TYPE_GRAB = 41, PP_MOUSECURSOR_TYPE_GRABBING = 42
}
enum  PP_NetAddress_Family { PP_NETADDRESS_FAMILY_UNSPECIFIED = 0, PP_NETADDRESS_FAMILY_IPV4 = 1, PP_NETADDRESS_FAMILY_IPV6 = 2 }
enum  PP_NetworkList_Type { PP_NETWORKLIST_TYPE_UNKNOWN = 0, PP_NETWORKLIST_TYPE_ETHERNET = 1, PP_NETWORKLIST_TYPE_WIFI = 2, PP_NETWORKLIST_TYPE_CELLULAR = 3 }
enum  PP_NetworkList_State { PP_NETWORKLIST_STATE_DOWN = 0, PP_NETWORKLIST_STATE_UP = 1 }
enum  PP_TCPSocket_Option { PP_TCPSOCKET_OPTION_NO_DELAY = 0, PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE = 1, PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE = 2 }
enum  PP_TextInput_Type {
  PP_TEXTINPUT_TYPE_NONE = 0, PP_TEXTINPUT_TYPE_TEXT = 1, PP_TEXTINPUT_TYPE_PASSWORD = 2, PP_TEXTINPUT_TYPE_SEARCH = 3,
  PP_TEXTINPUT_TYPE_EMAIL = 4, PP_TEXTINPUT_TYPE_NUMBER = 5, PP_TEXTINPUT_TYPE_TELEPHONE = 6, PP_TEXTINPUT_TYPE_URL = 7
}
enum  PP_UDPSocket_Option { PP_UDPSOCKET_OPTION_ADDRESS_REUSE = 0, PP_UDPSOCKET_OPTION_BROADCAST = 1, PP_UDPSOCKET_OPTION_SEND_BUFFER_SIZE = 2, PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3 }
enum  PP_URLRequestProperty {
  PP_URLREQUESTPROPERTY_URL = 0, PP_URLREQUESTPROPERTY_METHOD = 1, PP_URLREQUESTPROPERTY_HEADERS = 2, PP_URLREQUESTPROPERTY_STREAMTOFILE = 3,
  PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS = 4, PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS = 5, PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS = 6, PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL = 7,
  PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS = 8, PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS = 9, PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING = 10, PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD = 11,
  PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERTHRESHOLD = 12, PP_URLREQUESTPROPERTY_CUSTOMUSERAGENT = 13
}
enum  PP_URLResponseProperty {
  PP_URLRESPONSEPROPERTY_URL = 0, PP_URLRESPONSEPROPERTY_REDIRECTURL = 1, PP_URLRESPONSEPROPERTY_REDIRECTMETHOD = 2, PP_URLRESPONSEPROPERTY_STATUSCODE = 3,
  PP_URLRESPONSEPROPERTY_STATUSLINE = 4, PP_URLRESPONSEPROPERTY_HEADERS = 5
}
enum  PP_WebSocketReadyState {
  PP_WEBSOCKETREADYSTATE_INVALID = -1, PP_WEBSOCKETREADYSTATE_CONNECTING = 0, PP_WEBSOCKETREADYSTATE_OPEN = 1, PP_WEBSOCKETREADYSTATE_CLOSING = 2,
  PP_WEBSOCKETREADYSTATE_CLOSED = 3
}
enum  PP_WebSocketCloseCode {
  PP_WEBSOCKETSTATUSCODE_NOT_SPECIFIED = 1005, PP_WEBSOCKETSTATUSCODE_NORMAL_CLOSURE = 1000, PP_WEBSOCKETSTATUSCODE_GOING_AWAY = 1001, PP_WEBSOCKETSTATUSCODE_PROTOCOL_ERROR = 1002,
  PP_WEBSOCKETSTATUSCODE_UNSUPPORTED_DATA = 1003, PP_WEBSOCKETSTATUSCODE_NO_STATUS_RECEIVED = 1005, PP_WEBSOCKETSTATUSCODE_ABNORMAL_CLOSURE = 1006, PP_WEBSOCKETSTATUSCODE_INVALID_FRAME_PAYLOAD_DATA = 1007,
  PP_WEBSOCKETSTATUSCODE_POLICY_VIOLATION = 1008, PP_WEBSOCKETSTATUSCODE_MESSAGE_TOO_BIG = 1009, PP_WEBSOCKETSTATUSCODE_MANDATORY_EXTENSION = 1010, PP_WEBSOCKETSTATUSCODE_INTERNAL_SERVER_ERROR = 1011,
  PP_WEBSOCKETSTATUSCODE_TLS_HANDSHAKE = 1015, PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MIN = 3000, PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MAX = 3999, PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MIN = 4000,
  PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MAX = 4999
}

Functions

 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES (PP_MouseCursor_Type, 4)

Variables

 PP_Bool
 PP_CompletionCallback_Flag
 PP_FileType
 PP_FileSystemType
 PP_Graphics3DAttrib
 PP_VarType
 PP_AudioSampleRate
 PP_LogLevel
 PP_FileOpenFlags
 PP_HostResolver_Flag
 PP_ImageDataFormat
 PP_InputEvent_Type
 PP_InputEvent_Modifier
 PP_InputEvent_MouseButton
 PP_InputEvent_Class
 PP_TouchListType
 PP_NetAddress_Family
 PP_NetworkList_Type
 PP_NetworkList_State
 PP_TCPSocket_Option
 PP_TextInput_Type
 PP_UDPSocket_Option
 PP_URLRequestProperty
 PP_URLResponseProperty
 PP_WebSocketReadyState
 PP_WebSocketCloseCode

Enumeration Type Documentation

anonymous enum

This enumeration contains enumerators of all PPAPI error codes.

Errors are negative valued. Callers should treat all negative values as a failure, even if it's not in the list, since the possible errors are likely to expand and change over time.

Enumerator:
PP_OK 

This value is returned by a function on successful synchronous completion or is passed as a result to a PP_CompletionCallback_Func on successful asynchronous completion.

PP_OK_COMPLETIONPENDING 

This value is returned by a function that accepts a PP_CompletionCallback and cannot complete synchronously.

This code indicates that the given callback will be asynchronously notified of the final result once it is available.

PP_ERROR_FAILED 

This value indicates failure for unspecified reasons.

PP_ERROR_ABORTED 

This value indicates failure due to an asynchronous operation being interrupted.

The most common cause of this error code is destroying a resource that still has a callback pending. All callbacks are guaranteed to execute, so any callbacks pending on a destroyed resource will be issued with PP_ERROR_ABORTED.

If you get an aborted notification that you aren't expecting, check to make sure that the resource you're using is still in scope. A common mistake is to create a resource on the stack, which will destroy the resource as soon as the function returns.

PP_ERROR_BADARGUMENT 

This value indicates failure due to an invalid argument.

PP_ERROR_BADRESOURCE 

This value indicates failure due to an invalid PP_Resource.

PP_ERROR_NOINTERFACE 

This value indicates failure due to an unavailable PPAPI interface.

PP_ERROR_NOACCESS 

This value indicates failure due to insufficient privileges.

PP_ERROR_NOMEMORY 

This value indicates failure due to insufficient memory.

PP_ERROR_NOSPACE 

This value indicates failure due to insufficient storage space.

PP_ERROR_NOQUOTA 

This value indicates failure due to insufficient storage quota.

PP_ERROR_INPROGRESS 

This value indicates failure due to an action already being in progress.

PP_ERROR_NOTSUPPORTED 

The requested command is not supported by the browser.

PP_ERROR_BLOCKS_MAIN_THREAD 

Returned if you try to use a null completion callback to "block until complete" on the main thread.

Blocking the main thread is not permitted to keep the browser responsive (otherwise, you may not be able to handle input events, and there are reentrancy and deadlock issues).

PP_ERROR_FILENOTFOUND 

This value indicates failure due to a file that does not exist.

PP_ERROR_FILEEXISTS 

This value indicates failure due to a file that already exists.

PP_ERROR_FILETOOBIG 

This value indicates failure due to a file that is too big.

PP_ERROR_FILECHANGED 

This value indicates failure due to a file having been modified unexpectedly.

PP_ERROR_NOTAFILE 

This value indicates that the pathname does not reference a file.

PP_ERROR_TIMEDOUT 

This value indicates failure due to a time limit being exceeded.

PP_ERROR_USERCANCEL 

This value indicates that the user cancelled rather than providing expected input.

PP_ERROR_NO_USER_GESTURE 

This value indicates failure due to lack of a user gesture such as a mouse click or key input event.

Examples of actions requiring a user gesture are showing the file chooser dialog and going into fullscreen mode.

PP_ERROR_CONTEXT_LOST 

This value indicates that the graphics context was lost due to a power management event.

PP_ERROR_NO_MESSAGE_LOOP 

Indicates an attempt to make a PPAPI call on a thread without previously registering a message loop via PPB_MessageLoop.AttachToCurrentThread.

Without this registration step, no PPAPI calls are supported.

PP_ERROR_WRONG_THREAD 

Indicates that the requested operation is not permitted on the current thread.

PP_ERROR_CONNECTION_CLOSED 

This value indicates that the connection was closed.

For TCP sockets, it corresponds to a TCP FIN.

PP_ERROR_CONNECTION_RESET 

This value indicates that the connection was reset.

For TCP sockets, it corresponds to a TCP RST.

PP_ERROR_CONNECTION_REFUSED 

This value indicates that the connection attempt was refused.

PP_ERROR_CONNECTION_ABORTED 

This value indicates that the connection was aborted.

For TCP sockets, it means the connection timed out as a result of not receiving an ACK for data sent. This can include a FIN packet that did not get ACK'd.

PP_ERROR_CONNECTION_FAILED 

This value indicates that the connection attempt failed.

PP_ERROR_CONNECTION_TIMEDOUT 

This value indicates that the connection attempt timed out.

PP_ERROR_ADDRESS_INVALID 

This value indicates that the IP address or port number is invalid.

PP_ERROR_ADDRESS_UNREACHABLE 

This value indicates that the IP address is unreachable.

This usually means that there is no route to the specified host or network.

PP_ERROR_ADDRESS_IN_USE 

This value is returned when attempting to bind an address that is already in use.

PP_ERROR_MESSAGE_TOO_BIG 

This value indicates that the message was too large for the transport.

PP_ERROR_NAME_NOT_RESOLVED 

This value indicates that the host name could not be resolved.

anonymous enum

This enumeration contains audio frame count constants.

PP_AUDIOMINSAMPLEFRAMECOUNT is the minimum possible frame count. PP_AUDIOMAXSAMPLEFRAMECOUNT is the maximum possible frame count.

Enumerator:
PP_AUDIOMINSAMPLEFRAMECOUNT 
PP_AUDIOMAXSAMPLEFRAMECOUNT 

PP_AudioSampleRate is an enumeration of the different audio sampling rates.

PP_AUDIOSAMPLERATE_44100 is the sample rate used on CDs and PP_AUDIOSAMPLERATE_48000 is the sample rate used on DVDs and Digital Audio Tapes.

Enumerator:
PP_AUDIOSAMPLERATE_NONE 
PP_AUDIOSAMPLERATE_44100 
PP_AUDIOSAMPLERATE_48000 
enum PP_Bool

The PP_Bool enum is a boolean value for use in PPAPI C headers.

The standard bool type is not available to pre-C99 compilers, and is not guaranteed to be compatible between C and C++, whereas the PPAPI C headers can be included from C or C++ code.

Enumerator:
PP_FALSE 
PP_TRUE 

This enumeration contains flags used to control how non-NULL callbacks are scheduled by asynchronous methods.

Enumerator:
PP_COMPLETIONCALLBACK_FLAG_NONE 

By default any non-NULL callback will 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 same thread on which the method was invoked.

NOTE: If the method taking the callback is invoked on a background thread that has no valid PPB_MessageLoop resource attached, the system has no way to run the callback on the correct thread. In this case, a log message will be emitted and the plugin will be made to crash.

PP_COMPLETIONCALLBACK_FLAG_OPTIONAL 

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 same thread on which the method was invoked. If there is no valid PPB_MessageLoop attached to that thread, and the callback would normally run asynchronously, the invoked method will return PP_ERROR_NO_MESSAGE_LOOP.

The PP_FileOpenFlags enum contains file open constants.

Enumerator:
PP_FILEOPENFLAG_READ 

Requests read access to a file.

PP_FILEOPENFLAG_WRITE 

Requests write access to a file.

May be combined with PP_FILEOPENFLAG_READ to request read and write access.

PP_FILEOPENFLAG_CREATE 

Requests that the file be created if it does not exist.

If the file already exists, then this flag is ignored unless PP_FILEOPENFLAG_EXCLUSIVE was also specified, in which case FileIO::Open() will fail.

PP_FILEOPENFLAG_TRUNCATE 

Requests that the file be truncated to length 0 if it exists and is a regular file.

PP_FILEOPENFLAG_WRITE must also be specified.

PP_FILEOPENFLAG_EXCLUSIVE 

Requests that the file is created when this flag is combined with PP_FILEOPENFLAG_CREATE.

If this flag is specified, and the file already exists, then the FileIO::Open() call will fail.

PP_FILEOPENFLAG_APPEND 

Requests write access to a file, but writes will always occur at the end of the file.

Mututally exclusive with PP_FILEOPENFLAG_WRITE.

This is only supported in version 1.2 (Chrome 29) and later.

The PP_FileSystemType enum contains file system type constants.

Enumerator:
PP_FILESYSTEMTYPE_INVALID 

For identified invalid return values.

PP_FILESYSTEMTYPE_EXTERNAL 

For external file system types.

PP_FILESYSTEMTYPE_LOCALPERSISTENT 

For local persistent file system types.

PP_FILESYSTEMTYPE_LOCALTEMPORARY 

For local temporary file system types.

PP_FILESYSTEMTYPE_ISOLATED 

For isolated file system types.

The PP_FileType enum contains file type constants.

Enumerator:
PP_FILETYPE_REGULAR 

A regular file type.

PP_FILETYPE_DIRECTORY 

A directory.

PP_FILETYPE_OTHER 

A catch-all for unidentified types.

Enumerator:
PP_GRAPHICS3DATTRIB_ALPHA_SIZE 

Bits of Alpha in the color buffer.

PP_GRAPHICS3DATTRIB_BLUE_SIZE 

Bits of Blue in the color buffer.

PP_GRAPHICS3DATTRIB_GREEN_SIZE 

Bits of Green in the color buffer.

PP_GRAPHICS3DATTRIB_RED_SIZE 

Bits of Red in the color buffer.

PP_GRAPHICS3DATTRIB_DEPTH_SIZE 

Bits of Z in the depth buffer.

PP_GRAPHICS3DATTRIB_STENCIL_SIZE 

Bits of Stencil in the stencil buffer.

PP_GRAPHICS3DATTRIB_SAMPLES 

Number of samples per pixel.

PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS 

Number of multisample buffers.

PP_GRAPHICS3DATTRIB_NONE 

Attrib list terminator.

PP_GRAPHICS3DATTRIB_HEIGHT 

Height of surface in pixels.

PP_GRAPHICS3DATTRIB_WIDTH 

Width of surface in pixels.

PP_GRAPHICS3DATTRIB_SWAP_BEHAVIOR 

Specifies the effect on the color buffer of posting a surface with SwapBuffers.

The initial value is chosen by the implementation.

PP_GRAPHICS3DATTRIB_BUFFER_PRESERVED 

Indicates that color buffer contents are unaffected.

PP_GRAPHICS3DATTRIB_BUFFER_DESTROYED 

Indicates that color buffer contents may be destroyed or changed.

PP_GRAPHICS3DATTRIB_GPU_PREFERENCE 

Specifies whether the context is intended to be low-power or high-performance.

The initial value is PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE.

PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER 

The context should be low-power, and may be created on an integrated gpu.

PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE 

The context may be high-power and may be created on a discrete gpu.

PP_HostResolver_Flag is an enumeration of flags which can be OR-ed and passed to the host resolver.

Currently there is only one flag defined.

Enumerator:
PP_HOSTRESOLVER_FLAG_CANONNAME 

Hint to request the canonical name of the host, which can be retrieved by GetCanonicalName().

PP_ImageDataFormat is an enumeration of the different types of image data formats.

The third part of each enumeration value describes the memory layout from the lowest address to the highest. For example, BGRA means the B component is stored in the lowest address, no matter what endianness the platform is using.

The PREMUL suffix implies pre-multiplied alpha is used. In this mode, the red, green and blue color components of the pixel data supplied to an image data should be pre-multiplied by their alpha value. For example: starting with floating point color components, here is how to convert them to 8-bit premultiplied components for image data:

...components of a pixel, floats ranging from 0 to 1... float red = 1.0f; float green = 0.50f; float blue = 0.0f; float alpha = 0.75f; ...components for image data are 8-bit values ranging from 0 to 255... uint8_t image_data_red_premul = (uint8_t)(red * alpha * 255.0f); uint8_t image_data_green_premul = (uint8_t)(green * alpha * 255.0f); uint8_t image_data_blue_premul = (uint8_t)(blue * alpha * 255.0f); uint8_t image_data_alpha_premul = (uint8_t)(alpha * 255.0f);

Note: The resulting pre-multiplied red, green and blue components should not be greater than the alpha value.

Enumerator:
PP_IMAGEDATAFORMAT_BGRA_PREMUL 
PP_IMAGEDATAFORMAT_RGBA_PREMUL 
Enumerator:
PP_INPUTEVENT_CLASS_MOUSE 

Request mouse input events.

Normally you will request mouse events by calling RequestInputEvents(). The only use case for filtered events (via RequestFilteringInputEvents()) is for instances that have irregular outlines and you want to perform hit testing, which is very uncommon. Requesting non-filtered mouse events will lead to higher performance.

PP_INPUTEVENT_CLASS_KEYBOARD 

Requests keyboard events.

Often you will want to request filtered mode (via RequestFilteringInputEvents) for keyboard events so you can pass on events (by returning false) that you don't handle. For example, if you don't request filtered mode and the user pressed "Page Down" when your instance has focus, the page won't scroll which will be a poor experience.

A small number of tab and window management commands like Alt-F4 are never sent to the page. You can not request these keyboard commands since it would allow pages to trap users on a page.

PP_INPUTEVENT_CLASS_WHEEL 

Identifies scroll wheel input event.

Wheel events must be requested in filtering mode via RequestFilteringInputEvents(). This is because many wheel commands should be forwarded to the page.

Most instances will not need this event. Consuming wheel events by returning true from your filtered event handler will prevent the user from scrolling the page when the mouse is over the instance which can be very annoying.

If you handle wheel events (for example, you have a document viewer which the user can scroll), the recommended behavior is to return false only if the wheel event actually causes your document to scroll. When the user reaches the end of the document, return false to indicating that the event was not handled. This will then forward the event to the containing page for scrolling, producing the nested scrolling behavior users expect from frames in a page.

PP_INPUTEVENT_CLASS_TOUCH 

Identifies touch input events.

Request touch events only if you intend to handle them. If the browser knows you do not need to handle touch events, it can handle them at a higher level and achieve higher performance. If the plugin does not register for touch-events, then it will receive synthetic mouse events that are generated from the touch events (e.g. mouse-down for touch-start, mouse-move for touch-move (with left-button down), and mouse-up for touch-end. If the plugin does register for touch events, then the synthetic mouse events are not created.

PP_INPUTEVENT_CLASS_IME 

Identifies IME composition input events.

Request this input event class if you allow on-the-spot IME input.

This enumeration contains event modifier constants.

Each modifier is one bit. Retrieve the modifiers from an input event using the GetEventModifiers function on PPB_InputEvent.

Enumerator:
PP_INPUTEVENT_MODIFIER_SHIFTKEY 
PP_INPUTEVENT_MODIFIER_CONTROLKEY 
PP_INPUTEVENT_MODIFIER_ALTKEY 
PP_INPUTEVENT_MODIFIER_METAKEY 
PP_INPUTEVENT_MODIFIER_ISKEYPAD 
PP_INPUTEVENT_MODIFIER_ISAUTOREPEAT 
PP_INPUTEVENT_MODIFIER_LEFTBUTTONDOWN 
PP_INPUTEVENT_MODIFIER_MIDDLEBUTTONDOWN 
PP_INPUTEVENT_MODIFIER_RIGHTBUTTONDOWN 
PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY 
PP_INPUTEVENT_MODIFIER_NUMLOCKKEY 
PP_INPUTEVENT_MODIFIER_ISLEFT 
PP_INPUTEVENT_MODIFIER_ISRIGHT 

This enumeration contains constants representing each mouse button.

To get the mouse button for a mouse down or up event, use GetMouseButton on PPB_InputEvent.

Enumerator:
PP_INPUTEVENT_MOUSEBUTTON_NONE 
PP_INPUTEVENT_MOUSEBUTTON_LEFT 
PP_INPUTEVENT_MOUSEBUTTON_MIDDLE 
PP_INPUTEVENT_MOUSEBUTTON_RIGHT 

This enumeration contains the types of input events.

Enumerator:
PP_INPUTEVENT_TYPE_UNDEFINED 
PP_INPUTEVENT_TYPE_MOUSEDOWN 

Notification that a mouse button was pressed.

Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.

PP_INPUTEVENT_TYPE_MOUSEUP 

Notification that a mouse button was released.

Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.

PP_INPUTEVENT_TYPE_MOUSEMOVE 

Notification that a mouse button was moved when it is over the instance or dragged out of it.

Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.

PP_INPUTEVENT_TYPE_MOUSEENTER 

Notification that the mouse entered the instance's bounds.

Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.

PP_INPUTEVENT_TYPE_MOUSELEAVE 

Notification that a mouse left the instance's bounds.

Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.

PP_INPUTEVENT_TYPE_WHEEL 

Notification that the scroll wheel was used.

Register for this event using the PP_INPUTEVENT_CLASS_WHEEL class.

PP_INPUTEVENT_TYPE_RAWKEYDOWN 

Notification that a key transitioned from "up" to "down".

Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class.

PP_INPUTEVENT_TYPE_KEYDOWN 

Notification that a key was pressed.

This does not necessarily correspond to a character depending on the key and language. Use the PP_INPUTEVENT_TYPE_CHAR for character input.

Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class.

PP_INPUTEVENT_TYPE_KEYUP 

Notification that a key was released.

Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class.

PP_INPUTEVENT_TYPE_CHAR 

Notification that a character was typed.

Use this for text input. Key down events may generate 0, 1, or more than one character event depending on the key, locale, and operating system.

Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class.

PP_INPUTEVENT_TYPE_CONTEXTMENU 

Notification that a context menu should be shown.

This message will be sent when the user right-clicks or performs another OS-specific mouse command that should open a context menu. When this event is delivered depends on the system, on some systems (Mac) it will delivered after the mouse down event, and on others (Windows) it will be delivered after the mouse up event.

You will always get the normal mouse events. For example, you may see MOUSEDOWN,CONTEXTMENU,MOUSEUP or MOUSEDOWN,MOUSEUP,CONTEXTMENU.

The return value from the event handler determines if the context menu event will be passed to the page when you are using filtered input events (via RequestFilteringInputEvents()). In non-filtering mode the event will never be propagated and no context menu will be displayed. If you are handling mouse events in filtering mode, you may want to return true from this event even if you do not support a context menu to suppress the default one.

Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.

PP_INPUTEVENT_TYPE_IME_COMPOSITION_START 

Notification that an input method composition process has just started.

Register for this event using the PP_INPUTEVENT_CLASS_IME class.

PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE 

Notification that the input method composition string is updated.

Register for this event using the PP_INPUTEVENT_CLASS_IME class.

PP_INPUTEVENT_TYPE_IME_COMPOSITION_END 

Notification that an input method composition process has completed.

Register for this event using the PP_INPUTEVENT_CLASS_IME class.

PP_INPUTEVENT_TYPE_IME_TEXT 

Notification that an input method committed a string.

Register for this event using the PP_INPUTEVENT_CLASS_IME class.

PP_INPUTEVENT_TYPE_TOUCHSTART 

Notification that a finger was placed on a touch-enabled device.

Register for this event using the PP_INPUTEVENT_CLASS_TOUCH class.

PP_INPUTEVENT_TYPE_TOUCHMOVE 

Notification that a finger was moved on a touch-enabled device.

Register for this event using the PP_INPUTEVENT_CLASS_TOUCH class.

PP_INPUTEVENT_TYPE_TOUCHEND 

Notification that a finger was released on a touch-enabled device.

Register for this event using the PP_INPUTEVENT_CLASS_TOUCH class.

PP_INPUTEVENT_TYPE_TOUCHCANCEL 

Notification that a touch event was canceled.

Register for this event using the PP_INPUTEVENT_CLASS_TOUCH class.

Enumerator:
PP_LOGLEVEL_TIP 
PP_LOGLEVEL_LOG 
PP_LOGLEVEL_WARNING 
PP_LOGLEVEL_ERROR 

The PP_MouseCursor_Type enumeration lists the available stock cursor types.

Enumerator:
PP_MOUSECURSOR_TYPE_CUSTOM 
PP_MOUSECURSOR_TYPE_POINTER 
PP_MOUSECURSOR_TYPE_CROSS 
PP_MOUSECURSOR_TYPE_HAND 
PP_MOUSECURSOR_TYPE_IBEAM 
PP_MOUSECURSOR_TYPE_WAIT 
PP_MOUSECURSOR_TYPE_HELP 
PP_MOUSECURSOR_TYPE_EASTRESIZE 
PP_MOUSECURSOR_TYPE_NORTHRESIZE 
PP_MOUSECURSOR_TYPE_NORTHEASTRESIZE 
PP_MOUSECURSOR_TYPE_NORTHWESTRESIZE 
PP_MOUSECURSOR_TYPE_SOUTHRESIZE 
PP_MOUSECURSOR_TYPE_SOUTHEASTRESIZE 
PP_MOUSECURSOR_TYPE_SOUTHWESTRESIZE 
PP_MOUSECURSOR_TYPE_WESTRESIZE 
PP_MOUSECURSOR_TYPE_NORTHSOUTHRESIZE 
PP_MOUSECURSOR_TYPE_EASTWESTRESIZE 
PP_MOUSECURSOR_TYPE_NORTHEASTSOUTHWESTRESIZE 
PP_MOUSECURSOR_TYPE_NORTHWESTSOUTHEASTRESIZE 
PP_MOUSECURSOR_TYPE_COLUMNRESIZE 
PP_MOUSECURSOR_TYPE_ROWRESIZE 
PP_MOUSECURSOR_TYPE_MIDDLEPANNING 
PP_MOUSECURSOR_TYPE_EASTPANNING 
PP_MOUSECURSOR_TYPE_NORTHPANNING 
PP_MOUSECURSOR_TYPE_NORTHEASTPANNING 
PP_MOUSECURSOR_TYPE_NORTHWESTPANNING 
PP_MOUSECURSOR_TYPE_SOUTHPANNING 
PP_MOUSECURSOR_TYPE_SOUTHEASTPANNING 
PP_MOUSECURSOR_TYPE_SOUTHWESTPANNING 
PP_MOUSECURSOR_TYPE_WESTPANNING 
PP_MOUSECURSOR_TYPE_MOVE 
PP_MOUSECURSOR_TYPE_VERTICALTEXT 
PP_MOUSECURSOR_TYPE_CELL 
PP_MOUSECURSOR_TYPE_CONTEXTMENU 
PP_MOUSECURSOR_TYPE_ALIAS 
PP_MOUSECURSOR_TYPE_PROGRESS 
PP_MOUSECURSOR_TYPE_NODROP 
PP_MOUSECURSOR_TYPE_COPY 
PP_MOUSECURSOR_TYPE_NONE 
PP_MOUSECURSOR_TYPE_NOTALLOWED 
PP_MOUSECURSOR_TYPE_ZOOMIN 
PP_MOUSECURSOR_TYPE_ZOOMOUT 
PP_MOUSECURSOR_TYPE_GRAB 
PP_MOUSECURSOR_TYPE_GRABBING 

Network address family types.

Enumerator:
PP_NETADDRESS_FAMILY_UNSPECIFIED 

The address family is unspecified.

PP_NETADDRESS_FAMILY_IPV4 

The Internet Protocol version 4 (IPv4) address family.

PP_NETADDRESS_FAMILY_IPV6 

The Internet Protocol version 6 (IPv6) address family.

State of a network interface.

Enumerator:
PP_NETWORKLIST_STATE_DOWN 

Network interface is down.

PP_NETWORKLIST_STATE_UP 

Network interface is up.

Type of a network interface.

Enumerator:
PP_NETWORKLIST_TYPE_UNKNOWN 

Type of the network interface is not known.

PP_NETWORKLIST_TYPE_ETHERNET 

Wired Ethernet network.

PP_NETWORKLIST_TYPE_WIFI 

Wireless Wi-Fi network.

PP_NETWORKLIST_TYPE_CELLULAR 

Cellular network (e.g.

LTE).

Option names used by SetOption().

Enumerator:
PP_TCPSOCKET_OPTION_NO_DELAY 

Disables coalescing of small writes to make TCP segments, and instead delivers data immediately.

Value's type is PP_VARTYPE_BOOL. This option can only be set after a successful Connect() call.

PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE 

Specifies the total per-socket buffer space reserved for sends.

Value's type should be PP_VARTYPE_INT32. This option can only be set after a successful Connect() call.

Note: This is only treated as a hint for the browser to set the buffer size. Even if SetOption() succeeds, the browser doesn't guarantee it will conform to the size.

PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE 

Specifies the total per-socket buffer space reserved for receives.

Value's type should be PP_VARTYPE_INT32. This option can only be set after a successful Connect() call.

Note: This is only treated as a hint for the browser to set the buffer size. Even if SetOption() succeeds, the browser doesn't guarantee it will conform to the size.

PP_TextInput_Type is used to indicate the status of a plugin in regard to text input.

Enumerator:
PP_TEXTINPUT_TYPE_NONE 

Input caret is not in an editable mode, no input method shall be used.

PP_TEXTINPUT_TYPE_TEXT 

Input caret is in a normal editable mode, any input method can be used.

PP_TEXTINPUT_TYPE_PASSWORD 

Input caret is in a password box, an input method may be used only if it's suitable for password input.

PP_TEXTINPUT_TYPE_SEARCH 
PP_TEXTINPUT_TYPE_EMAIL 
PP_TEXTINPUT_TYPE_NUMBER 
PP_TEXTINPUT_TYPE_TELEPHONE 
PP_TEXTINPUT_TYPE_URL 
Enumerator:
PP_TOUCHLIST_TYPE_TOUCHES 

The list of all TouchPoints which are currently down.

PP_TOUCHLIST_TYPE_CHANGEDTOUCHES 

The list of all TouchPoints whose state has changed since the last TouchInputEvent.

PP_TOUCHLIST_TYPE_TARGETTOUCHES 

The list of all TouchPoints which are targeting this plugin.

This is a subset of Touches.

Option names used by SetOption().

Enumerator:
PP_UDPSOCKET_OPTION_ADDRESS_REUSE 

Allows the socket to share the local address to which it will be bound with other processes.

Value's type should be PP_VARTYPE_BOOL. This option can only be set before calling Bind().

PP_UDPSOCKET_OPTION_BROADCAST 

Allows sending and receiving packets to and from broadcast addresses.

Value's type should be PP_VARTYPE_BOOL. This option can only be set before calling Bind().

PP_UDPSOCKET_OPTION_SEND_BUFFER_SIZE 

Specifies the total per-socket buffer space reserved for sends.

Value's type should be PP_VARTYPE_INT32. This option can only be set after a successful Bind() call.

Note: This is only treated as a hint for the browser to set the buffer size. Even if SetOption() succeeds, the browser doesn't guarantee it will conform to the size.

PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE 

Specifies the total per-socket buffer space reserved for receives.

Value's type should be PP_VARTYPE_INT32. This option can only be set after a successful Bind() call.

Note: This is only treated as a hint for the browser to set the buffer size. Even if SetOption() succeeds, the browser doesn't guarantee it will conform to the size.

This enumeration contains properties that can be set on a URL request.

Enumerator:
PP_URLREQUESTPROPERTY_URL 

This corresponds to a string (PP_VARTYPE_STRING).

PP_URLREQUESTPROPERTY_METHOD 

This corresponds to a string (PP_VARTYPE_STRING); either POST or GET.

Refer to the HTTP Methods documentation for further information.

PP_URLREQUESTPROPERTY_HEADERS 

This corresponds to a string (PP_VARTYPE_STRING);
delimited.

Refer to the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"Header Field Definitions documentation for further information.

PP_URLREQUESTPROPERTY_STREAMTOFILE 

This corresponds to a PP_Bool (PP_VARTYPE_BOOL; default=PP_FALSE).

Set this value to PP_TRUE if you want to download the data to a file. Use PPB_URLLoader.FinishStreamingToFile() to complete the download.

PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS 

This corresponds to a PP_Bool (PP_VARTYPE_BOOL; default=PP_TRUE).

Set this value to PP_FALSE if you want to use PPB_URLLoader.FollowRedirects() to follow the redirects only after examining redirect headers.

PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS 

This corresponds to a PP_Bool (PP_VARTYPE_BOOL; default=PP_FALSE).

Set this value to PP_TRUE if you want to be able to poll the download progress using PPB_URLLoader.GetDownloadProgress().

PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS 

This corresponds to a PP_Bool (default=PP_FALSE).

Set this value to PP_TRUE if you want to be able to poll the upload progress using PPB_URLLoader.GetUploadProgress().

PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL 

This corresponds to a string (PP_VARTYPE_STRING) or may be undefined (PP_VARTYPE_UNDEFINED; default).

Set it to a string to set a custom referrer (if empty, the referrer header will be omitted), or to undefined to use the default referrer. Only loaders with universal access (only available on trusted implementations) will accept URLRequestInfo objects that try to set a custom referrer; if given to a loader without universal access, PP_ERROR_NOACCESS will result.

PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS 

This corresponds to a PP_Bool (PP_VARTYPE_BOOL; default=PP_FALSE).

Whether cross-origin requests are allowed. Cross-origin requests are made using the CORS (Cross-Origin Resource Sharing) algorithm to check whether the request should be allowed. For the complete CORS algorithm, refer to the Cross-Origin Resource Sharing documentation.

PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS 

This corresponds to a PP_Bool (PP_VARTYPE_BOOL; default=PP_FALSE).

Whether HTTP credentials are sent with cross-origin requests. If false, no credentials are sent with the request and cookies are ignored in the response. If the request is not cross-origin, this property is ignored.

PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING 

This corresponds to a string (PP_VARTYPE_STRING) or may be undefined (PP_VARTYPE_UNDEFINED; default).

Set it to a string to set a custom content-transfer-encoding header (if empty, that header will be omitted), or to undefined to use the default (if any). Only loaders with universal access (only available on trusted implementations) will accept URLRequestInfo objects that try to set a custom content transfer encoding; if given to a loader without universal access, PP_ERROR_NOACCESS will result.

PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD 

This corresponds to an integer (PP_VARTYPE_INT32); default is not defined and is set by the browser, possibly depending on system capabilities.

Set it to an integer to set an upper threshold for the prefetched buffer of an asynchronous load. When exceeded, the browser will defer loading until PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD is hit, at which time it will begin prefetching again. When setting this property, PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD must also be set. Behavior is undefined if the former is <= the latter.

PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERTHRESHOLD 

This corresponds to an integer (PP_VARTYPE_INT32); default is not defined and is set by the browser to a value appropriate for the default PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD.

Set it to an integer to set a lower threshold for the prefetched buffer of an asynchronous load. When reached, the browser will resume loading if If PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD had previously been reached. When setting this property, PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD must also be set. Behavior is undefined if the former is >= the latter.

PP_URLREQUESTPROPERTY_CUSTOMUSERAGENT 

This corresponds to a string (PP_VARTYPE_STRING) or may be undefined (PP_VARTYPE_UNDEFINED; default).

Set it to a string to set a custom user-agent header (if empty, that header will be omitted), or to undefined to use the default. Only loaders with universal access (only available on trusted implementations) will accept URLRequestInfo objects that try to set a custom user agent; if given to a loader without universal access, PP_ERROR_NOACCESS will result.

This enumeration contains properties set on a URL response.

Enumerator:
PP_URLRESPONSEPROPERTY_URL 

This corresponds to a string (PP_VARTYPE_STRING); an absolute URL formed by resolving the relative request URL with the absolute document URL.

Refer to the HTTP Request URI and HTML Resolving Relative URIs documentation for further information.

PP_URLRESPONSEPROPERTY_REDIRECTURL 

This corresponds to a string (PP_VARTYPE_STRING); the absolute URL returned in the response header's 'Location' field if this is a redirect response, an empty string otherwise.

Refer to the HTTP Status Codes - Redirection documentation for further information.

PP_URLRESPONSEPROPERTY_REDIRECTMETHOD 

This corresponds to a string (PP_VARTYPE_STRING); the HTTP method to be used in a new request if this is a redirect response, an empty string otherwise.

Refer to the HTTP Status Codes - Redirection documentation for further information.

PP_URLRESPONSEPROPERTY_STATUSCODE 

This corresponds to an int32 (PP_VARETYPE_INT32); the status code from the response, e.g., 200 if the request was successful.

Refer to the HTTP Status Code and Reason Phrase documentation for further information.

PP_URLRESPONSEPROPERTY_STATUSLINE 

This corresponds to a string (PP_VARTYPE_STRING); the status line from the response.

Refer to the HTTP Response Status Line documentation for further information.

PP_URLRESPONSEPROPERTY_HEADERS 

This corresponds to a string(PP_VARTYPE_STRING), a
-delimited list of header field/value pairs of the form "field: value", returned by the server.

Refer to the HTTP Header Field Definitions documentation for further information.

enum PP_VarType

The PP_VarType is an enumeration of the different types that can be contained within a PP_Var structure.

Enumerator:
PP_VARTYPE_UNDEFINED 

An undefined value.

PP_VARTYPE_NULL 

A NULL value.

This is similar to undefined, but JavaScript differentiates the two so it is exposed here as well.

PP_VARTYPE_BOOL 

A boolean value, use the as_bool member of the var.

PP_VARTYPE_INT32 

A 32-bit integer value.

Use the as_int member of the var.

PP_VARTYPE_DOUBLE 

A double-precision floating point value.

Use the as_double member of the var.

PP_VARTYPE_STRING 

The Var represents a string.

The as_id field is used to identify the string, which may be created and retrieved from the PPB_Var interface. These objects are reference counted, so AddRef and Release must be used properly to avoid memory leaks.

PP_VARTYPE_OBJECT 

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.

PP_VARTYPE_ARRAY 

Represents an array of Vars.

The as_id field is used to identify the array, which may be created and manipulated from the PPB_VarArray interface. These objects are reference counted, so AddRef and Release must be used properly to avoid memory leaks.

PP_VARTYPE_DICTIONARY 

Represents a mapping from strings to Vars.

The as_id field is used to identify the dictionary, which may be created and manipulated from the PPB_VarDictionary interface. These objects are reference counted, so AddRef and Release must be used properly to avoid memory leaks.

PP_VARTYPE_ARRAY_BUFFER 

ArrayBuffer represents a JavaScript ArrayBuffer.

This is the type which 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.

PP_VARTYPE_RESOURCE 

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 enumeration contains status codes.

These codes are used in Close() and GetCloseCode(). Refer to RFC 6455, The WebSocket Protocol, for further information. PP_WEBSOCKETSTATUSCODE_NORMAL_CLOSURE and codes in the range PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MIN to PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MAX, and PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MIN to PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MAX are valid for Close().

Enumerator:
PP_WEBSOCKETSTATUSCODE_NOT_SPECIFIED 

Indicates to request closing connection without status code and reason.

(Note that the code 1005 is forbidden to send in actual close frames by the RFC. PP_WebSocket reuses this code internally and the code will never appear in the actual close frames.)

PP_WEBSOCKETSTATUSCODE_NORMAL_CLOSURE 

Status codes in the range 0-999 are not used.

Indicates a normal closure.

PP_WEBSOCKETSTATUSCODE_GOING_AWAY 

Indicates that an endpoint is "going away", such as a server going down.

PP_WEBSOCKETSTATUSCODE_PROTOCOL_ERROR 

Indicates that an endpoint is terminating the connection due to a protocol error.

PP_WEBSOCKETSTATUSCODE_UNSUPPORTED_DATA 

Indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept.

PP_WEBSOCKETSTATUSCODE_NO_STATUS_RECEIVED 

Status code 1004 is reserved.

Pseudo code to indicate that receiving close frame doesn't contain any status code.

PP_WEBSOCKETSTATUSCODE_ABNORMAL_CLOSURE 

Pseudo code to indicate that connection was closed abnormally, e.g., without closing handshake.

PP_WEBSOCKETSTATUSCODE_INVALID_FRAME_PAYLOAD_DATA 

Indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 data within a text message).

PP_WEBSOCKETSTATUSCODE_POLICY_VIOLATION 

Indicates that an endpoint is terminating the connection because it has received a message that violates its policy.

PP_WEBSOCKETSTATUSCODE_MESSAGE_TOO_BIG 

Indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process.

PP_WEBSOCKETSTATUSCODE_MANDATORY_EXTENSION 

Indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.

PP_WEBSOCKETSTATUSCODE_INTERNAL_SERVER_ERROR 

Indicates that a server is terminating the connection because it encountered an unexpected condition.

PP_WEBSOCKETSTATUSCODE_TLS_HANDSHAKE 

Status codes in the range 1012-1014 are reserved.

Pseudo code to indicate that the connection was closed due to a failure to perform a TLS handshake.

PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MIN 

Status codes in the range 1016-2999 are reserved.

Status codes in the range 3000-3999 are reserved for use by libraries, frameworks, and applications. These codes are registered directly with IANA.

PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MAX 
PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MIN 

Status codes in the range 4000-4999 are reserved for private use.

Application can use these codes for application specific purposes freely.

PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MAX 

This enumeration contains the types representing the WebSocket ready state and these states are based on the JavaScript WebSocket API specification.

GetReadyState() returns one of these states.

Enumerator:
PP_WEBSOCKETREADYSTATE_INVALID 

Ready state is queried on an invalid resource.

PP_WEBSOCKETREADYSTATE_CONNECTING 

Ready state that the connection has not yet been established.

PP_WEBSOCKETREADYSTATE_OPEN 

Ready state that the WebSocket connection is established and communication is possible.

PP_WEBSOCKETREADYSTATE_CLOSING 

Ready state that the connection is going through the closing handshake.

PP_WEBSOCKETREADYSTATE_CLOSED 

Ready state that the connection has been closed or could not be opened.


Function Documentation


Variable Documentation