OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_H_ | 5 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_H_ |
6 #define PPAPI_C_PRIVATE_PPB_FLASH_H_ | 6 #define PPAPI_C_PRIVATE_PPB_FLASH_H_ |
7 | 7 |
8 #ifdef _WIN32 | 8 #ifdef _WIN32 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
11 | 11 |
12 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
13 #include "ppapi/c/pp_errors.h" | 13 #include "ppapi/c/pp_errors.h" |
14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
15 #include "ppapi/c/pp_point.h" | 15 #include "ppapi/c/pp_point.h" |
16 #include "ppapi/c/pp_rect.h" | 16 #include "ppapi/c/pp_rect.h" |
17 #include "ppapi/c/pp_resource.h" | 17 #include "ppapi/c/pp_resource.h" |
18 #include "ppapi/c/pp_var.h" | 18 #include "ppapi/c/pp_var.h" |
19 | 19 |
20 // PPB_Flash ------------------------------------------------------------------- | 20 // PPB_Flash ------------------------------------------------------------------- |
21 | 21 |
22 #define PPB_FLASH_INTERFACE "PPB_Flash;5" | 22 #define PPB_FLASH_INTERFACE "PPB_Flash;6" |
23 | 23 |
24 #ifdef _WIN32 | 24 #ifdef _WIN32 |
25 typedef HANDLE PP_FileHandle; | 25 typedef HANDLE PP_FileHandle; |
26 static const PP_FileHandle PP_kInvalidFileHandle = NULL; | 26 static const PP_FileHandle PP_kInvalidFileHandle = NULL; |
27 #else | 27 #else |
28 typedef int PP_FileHandle; | 28 typedef int PP_FileHandle; |
29 static const PP_FileHandle PP_kInvalidFileHandle = -1; | 29 static const PP_FileHandle PP_kInvalidFileHandle = -1; |
30 #endif | 30 #endif |
31 | 31 |
32 struct PP_CompletionCallback; | 32 struct PP_CompletionCallback; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // the popup blocker, even when this is not called from an event handler. | 115 // the popup blocker, even when this is not called from an event handler. |
116 PP_Bool (*NavigateToURL)(PP_Instance instance, | 116 PP_Bool (*NavigateToURL)(PP_Instance instance, |
117 const char* url, | 117 const char* url, |
118 const char* target); | 118 const char* target); |
119 | 119 |
120 // Runs a nested message loop. The plugin will be reentered from this call. | 120 // Runs a nested message loop. The plugin will be reentered from this call. |
121 // This function is used in places where Flash would normally enter a nested | 121 // This function is used in places where Flash would normally enter a nested |
122 // message loop (e.g., when displaying context menus), but Pepper provides | 122 // message loop (e.g., when displaying context menus), but Pepper provides |
123 // only an asynchronous call. After performing that asynchronous call, call | 123 // only an asynchronous call. After performing that asynchronous call, call |
124 // |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|. | 124 // |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|. |
125 void (*RunMessageLoop)(); | 125 void (*RunMessageLoop)(PP_Instance instance); |
126 | 126 |
127 // Posts a quit message for the outermost nested message loop. Use this to | 127 // Posts a quit message for the outermost nested message loop. Use this to |
128 // exit and return back to the caller after you call RunMessageLoop. | 128 // exit and return back to the caller after you call RunMessageLoop. |
129 void (*QuitMessageLoop)(); | 129 void (*QuitMessageLoop)(PP_Instance instance); |
130 }; | 130 }; |
131 | 131 |
132 // PPB_Flash_NetConnector ------------------------------------------------------ | 132 // PPB_Flash_NetConnector ------------------------------------------------------ |
133 | 133 |
134 #define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;1" | 134 #define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;1" |
135 | 135 |
136 // This is an opaque type holding a network address. | 136 // This is an opaque type holding a network address. |
137 struct PP_Flash_NetAddress { | 137 struct PP_Flash_NetAddress { |
138 size_t size; | 138 size_t size; |
139 char data[128]; | 139 char data[128]; |
(...skipping 18 matching lines...) Expand all Loading... |
158 // typical use-case would be for reconnections. | 158 // typical use-case would be for reconnections. |
159 int32_t (*ConnectTcpAddress)(PP_Resource connector_id, | 159 int32_t (*ConnectTcpAddress)(PP_Resource connector_id, |
160 const struct PP_Flash_NetAddress* addr, | 160 const struct PP_Flash_NetAddress* addr, |
161 PP_FileHandle* socket_out, | 161 PP_FileHandle* socket_out, |
162 struct PP_Flash_NetAddress* local_addr_out, | 162 struct PP_Flash_NetAddress* local_addr_out, |
163 struct PP_Flash_NetAddress* remote_addr_out, | 163 struct PP_Flash_NetAddress* remote_addr_out, |
164 PP_CompletionCallback callback); | 164 PP_CompletionCallback callback); |
165 }; | 165 }; |
166 | 166 |
167 #endif // PPAPI_C_PRIVATE_PPB_FLASH_H_ | 167 #endif // PPAPI_C_PRIVATE_PPB_FLASH_H_ |
OLD | NEW |