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;4" | 22 #define PPB_FLASH_INTERFACE "PPB_Flash;5" |
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Frees the data allocated by GetModuleLocalDirContents. | 109 // Frees the data allocated by GetModuleLocalDirContents. |
110 void (*FreeModuleLocalDirContents)(PP_Instance instance, | 110 void (*FreeModuleLocalDirContents)(PP_Instance instance, |
111 PP_DirContents_Dev* contents); | 111 PP_DirContents_Dev* contents); |
112 | 112 |
113 // Navigate to URL. May open a new tab if target is not "_self". Return true | 113 // Navigate to URL. May open a new tab if target is not "_self". Return true |
114 // if success. This differs from javascript:window.open() in that it bypasses | 114 // if success. This differs from javascript:window.open() in that it bypasses |
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 |
| 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 |
| 122 // message loop (e.g., when displaying context menus), but Pepper provides |
| 123 // only an asynchronous call. After performing that asynchronous call, call |
| 124 // |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|. |
| 125 void (*RunMessageLoop)(); |
| 126 |
| 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. |
| 129 void (*QuitMessageLoop)(); |
119 }; | 130 }; |
120 | 131 |
121 // PPB_Flash_NetConnector ------------------------------------------------------ | 132 // PPB_Flash_NetConnector ------------------------------------------------------ |
122 | 133 |
123 #define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;1" | 134 #define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;1" |
124 | 135 |
125 // This is an opaque type holding a network address. | 136 // This is an opaque type holding a network address. |
126 struct PP_Flash_NetAddress { | 137 struct PP_Flash_NetAddress { |
127 size_t size; | 138 size_t size; |
128 char data[128]; | 139 char data[128]; |
(...skipping 18 matching lines...) Expand all Loading... |
147 // typical use-case would be for reconnections. | 158 // typical use-case would be for reconnections. |
148 int32_t (*ConnectTcpAddress)(PP_Resource connector_id, | 159 int32_t (*ConnectTcpAddress)(PP_Resource connector_id, |
149 const struct PP_Flash_NetAddress* addr, | 160 const struct PP_Flash_NetAddress* addr, |
150 PP_FileHandle* socket_out, | 161 PP_FileHandle* socket_out, |
151 struct PP_Flash_NetAddress* local_addr_out, | 162 struct PP_Flash_NetAddress* local_addr_out, |
152 struct PP_Flash_NetAddress* remote_addr_out, | 163 struct PP_Flash_NetAddress* remote_addr_out, |
153 PP_CompletionCallback callback); | 164 PP_CompletionCallback callback); |
154 }; | 165 }; |
155 | 166 |
156 #endif // PPAPI_C_PRIVATE_PPB_FLASH_H_ | 167 #endif // PPAPI_C_PRIVATE_PPB_FLASH_H_ |
OLD | NEW |