OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_THUNK_INSTANCE_API_H_ | 5 #ifndef PPAPI_THUNK_INSTANCE_API_H_ |
6 #define PPAPI_THUNK_INSTANCE_API_H_ | 6 #define PPAPI_THUNK_INSTANCE_API_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ppapi/c/dev/ppb_console_dev.h" | 10 #include "ppapi/c/dev/ppb_console_dev.h" |
11 #include "ppapi/c/dev/ppb_text_input_dev.h" | 11 #include "ppapi/c/dev/ppb_text_input_dev.h" |
12 #include "ppapi/c/dev/ppb_url_util_dev.h" | 12 #include "ppapi/c/dev/ppb_url_util_dev.h" |
13 #include "ppapi/c/pp_bool.h" | 13 #include "ppapi/c/pp_bool.h" |
14 #include "ppapi/c/pp_completion_callback.h" | 14 #include "ppapi/c/pp_completion_callback.h" |
15 #include "ppapi/c/pp_size.h" | 15 #include "ppapi/c/pp_size.h" |
16 #include "ppapi/c/pp_time.h" | 16 #include "ppapi/c/pp_time.h" |
17 #include "ppapi/c/ppb_audio_config.h" | 17 #include "ppapi/c/ppb_audio_config.h" |
18 #include "ppapi/c/ppb_gamepad.h" | 18 #include "ppapi/c/ppb_gamepad.h" |
19 #include "ppapi/c/ppb_instance.h" | 19 #include "ppapi/c/ppb_instance.h" |
20 #include "ppapi/c/ppb_mouse_cursor.h" | 20 #include "ppapi/c/ppb_mouse_cursor.h" |
21 #include "ppapi/c/private/pp_content_decryptor.h" | 21 #include "ppapi/c/private/pp_content_decryptor.h" |
22 #include "ppapi/c/private/ppb_instance_private.h" | 22 #include "ppapi/c/private/ppb_instance_private.h" |
23 #include "ppapi/shared_impl/api_id.h" | 23 #include "ppapi/shared_impl/api_id.h" |
| 24 #include "ppapi/shared_impl/resource.h" |
24 | 25 |
25 // Windows headers interfere with this file. | 26 // Windows headers interfere with this file. |
26 #ifdef PostMessage | 27 #ifdef PostMessage |
27 #undef PostMessage | 28 #undef PostMessage |
28 #endif | 29 #endif |
29 | 30 |
30 struct PP_DecryptedBlockInfo; | 31 struct PP_DecryptedBlockInfo; |
31 struct PP_DecryptedFrameInfo; | 32 struct PP_DecryptedFrameInfo; |
32 | 33 |
33 namespace ppapi { | 34 namespace ppapi { |
34 | 35 |
| 36 class Resource; |
35 class TrackedCallback; | 37 class TrackedCallback; |
36 struct ViewData; | 38 struct ViewData; |
37 | 39 |
38 namespace thunk { | 40 namespace thunk { |
39 | 41 |
40 class PPB_Flash_API; | 42 class PPB_Flash_API; |
41 class PPB_Flash_Clipboard_API; | |
42 class PPB_Flash_Functions_API; | |
43 class PPB_Gamepad_API; | |
44 | 43 |
45 class PPB_Instance_API { | 44 class PPB_Instance_API { |
46 public: | 45 public: |
47 virtual ~PPB_Instance_API() {} | 46 virtual ~PPB_Instance_API() {} |
48 | 47 |
49 virtual PP_Bool BindGraphics(PP_Instance instance, PP_Resource device) = 0; | 48 virtual PP_Bool BindGraphics(PP_Instance instance, PP_Resource device) = 0; |
50 virtual PP_Bool IsFullFrame(PP_Instance instance) = 0; | 49 virtual PP_Bool IsFullFrame(PP_Instance instance) = 0; |
51 | 50 |
52 // Not an exposed PPAPI function, this returns the internal view data struct. | 51 // Not an exposed PPAPI function, this returns the internal view data struct. |
53 virtual const ViewData* GetViewData(PP_Instance instance) = 0; | 52 virtual const ViewData* GetViewData(PP_Instance instance) = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // Font. | 84 // Font. |
86 virtual PP_Var GetFontFamilies(PP_Instance instance) = 0; | 85 virtual PP_Var GetFontFamilies(PP_Instance instance) = 0; |
87 | 86 |
88 // Fullscreen. | 87 // Fullscreen. |
89 virtual PP_Bool SetFullscreen(PP_Instance instance, | 88 virtual PP_Bool SetFullscreen(PP_Instance instance, |
90 PP_Bool fullscreen) = 0; | 89 PP_Bool fullscreen) = 0; |
91 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) = 0; | 90 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) = 0; |
92 | 91 |
93 // Flash (Deprecated for Flash_Functions). | 92 // Flash (Deprecated for Flash_Functions). |
94 virtual PPB_Flash_API* GetFlashAPI() = 0; | 93 virtual PPB_Flash_API* GetFlashAPI() = 0; |
95 // Flash_Functions | |
96 virtual PPB_Flash_Functions_API* GetFlashFunctionsAPI( | |
97 PP_Instance instance) = 0; | |
98 | 94 |
99 // Flash_Clipboard. | 95 // This is an implementation-only function which grabs an instance of a |
100 virtual PPB_Flash_Clipboard_API* GetFlashClipboardAPI( | 96 // "singleton resource". These are used to implement instance interfaces |
101 PP_Instance instance) = 0; | 97 // (functions which are associated with the instance itself as opposed to a |
102 | 98 // resource). |
103 // Gamepad. | 99 virtual Resource* GetSingletonResource( |
104 virtual PPB_Gamepad_API* GetGamepadAPI(PP_Instance instance) = 0; | 100 PP_Instance instance, SingletonResourceID id) = 0; |
105 | 101 |
106 // InputEvent. | 102 // InputEvent. |
107 virtual int32_t RequestInputEvents(PP_Instance instance, | 103 virtual int32_t RequestInputEvents(PP_Instance instance, |
108 uint32_t event_classes) = 0; | 104 uint32_t event_classes) = 0; |
109 virtual int32_t RequestFilteringInputEvents(PP_Instance instance, | 105 virtual int32_t RequestFilteringInputEvents(PP_Instance instance, |
110 uint32_t event_classes) = 0; | 106 uint32_t event_classes) = 0; |
111 virtual void ClearInputEventRequest(PP_Instance instance, | 107 virtual void ClearInputEventRequest(PP_Instance instance, |
112 uint32_t event_classes) = 0; | 108 uint32_t event_classes) = 0; |
113 virtual void ClosePendingUserGesture(PP_Instance instance, | 109 virtual void ClosePendingUserGesture(PP_Instance instance, |
114 PP_TimeTicks timestamp) = 0; | 110 PP_TimeTicks timestamp) = 0; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 PP_URLComponents_Dev* components) = 0; | 195 PP_URLComponents_Dev* components) = 0; |
200 #endif // !defined(OS_NACL) | 196 #endif // !defined(OS_NACL) |
201 | 197 |
202 static const ApiID kApiID = API_ID_PPB_INSTANCE; | 198 static const ApiID kApiID = API_ID_PPB_INSTANCE; |
203 }; | 199 }; |
204 | 200 |
205 } // namespace thunk | 201 } // namespace thunk |
206 } // namespace ppapi | 202 } // namespace ppapi |
207 | 203 |
208 #endif // PPAPI_THUNK_INSTANCE_API_H_ | 204 #endif // PPAPI_THUNK_INSTANCE_API_H_ |
OLD | NEW |