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 "ppapi/c/dev/ppb_console_dev.h" | 8 #include "ppapi/c/dev/ppb_console_dev.h" |
9 #include "ppapi/c/dev/ppb_url_util_dev.h" | 9 #include "ppapi/c/dev/ppb_url_util_dev.h" |
10 #include "ppapi/c/pp_bool.h" | 10 #include "ppapi/c/pp_bool.h" |
11 #include "ppapi/c/pp_completion_callback.h" | 11 #include "ppapi/c/pp_completion_callback.h" |
12 #include "ppapi/c/pp_size.h" | 12 #include "ppapi/c/pp_size.h" |
13 #include "ppapi/c/pp_time.h" | 13 #include "ppapi/c/pp_time.h" |
14 #include "ppapi/c/ppb_audio_config.h" | 14 #include "ppapi/c/ppb_audio_config.h" |
15 #include "ppapi/c/ppb_gamepad.h" | 15 #include "ppapi/c/ppb_gamepad.h" |
16 #include "ppapi/c/ppb_instance.h" | 16 #include "ppapi/c/ppb_instance.h" |
17 #include "ppapi/c/ppb_mouse_cursor.h" | 17 #include "ppapi/c/ppb_mouse_cursor.h" |
18 #include "ppapi/c/private/ppb_instance_private.h" | 18 #include "ppapi/c/private/ppb_instance_private.h" |
| 19 #include "ppapi/shared_impl/api_callback_type.h" |
19 #include "ppapi/shared_impl/api_id.h" | 20 #include "ppapi/shared_impl/api_id.h" |
20 | 21 |
21 // Windows headers interfere with this file. | 22 // Windows headers interfere with this file. |
22 #ifdef PostMessage | 23 #ifdef PostMessage |
23 #undef PostMessage | 24 #undef PostMessage |
24 #endif | 25 #endif |
25 | 26 |
26 namespace ppapi { | 27 namespace ppapi { |
27 | 28 |
28 struct ViewData; | 29 struct ViewData; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 virtual void PostMessage(PP_Instance instance, PP_Var message) = 0; | 102 virtual void PostMessage(PP_Instance instance, PP_Var message) = 0; |
102 | 103 |
103 // Mouse cursor. | 104 // Mouse cursor. |
104 virtual PP_Bool SetCursor(PP_Instance instance, | 105 virtual PP_Bool SetCursor(PP_Instance instance, |
105 PP_MouseCursor_Type type, | 106 PP_MouseCursor_Type type, |
106 PP_Resource image, | 107 PP_Resource image, |
107 const PP_Point* hot_spot) = 0; | 108 const PP_Point* hot_spot) = 0; |
108 | 109 |
109 // MouseLock. | 110 // MouseLock. |
110 virtual int32_t LockMouse(PP_Instance instance, | 111 virtual int32_t LockMouse(PP_Instance instance, |
111 PP_CompletionCallback callback) = 0; | 112 ApiCallbackType callback) = 0; |
112 virtual void UnlockMouse(PP_Instance instance) = 0; | 113 virtual void UnlockMouse(PP_Instance instance) = 0; |
113 | 114 |
114 // Zoom. | 115 // Zoom. |
115 virtual void ZoomChanged(PP_Instance instance, double factor) = 0; | 116 virtual void ZoomChanged(PP_Instance instance, double factor) = 0; |
116 virtual void ZoomLimitsChanged(PP_Instance instance, | 117 virtual void ZoomLimitsChanged(PP_Instance instance, |
117 double minimum_factor, | 118 double minimum_factor, |
118 double maximium_factor) = 0; | 119 double maximium_factor) = 0; |
119 #if !defined(OS_NACL) | 120 #if !defined(OS_NACL) |
120 // URLUtil. | 121 // URLUtil. |
121 virtual PP_Var ResolveRelativeToDocument( | 122 virtual PP_Var ResolveRelativeToDocument( |
122 PP_Instance instance, | 123 PP_Instance instance, |
123 PP_Var relative, | 124 PP_Var relative, |
124 PP_URLComponents_Dev* components) = 0; | 125 PP_URLComponents_Dev* components) = 0; |
125 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) = 0; | 126 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) = 0; |
126 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, | 127 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, |
127 PP_Instance target) = 0; | 128 PP_Instance target) = 0; |
128 virtual PP_Var GetDocumentURL(PP_Instance instance, | 129 virtual PP_Var GetDocumentURL(PP_Instance instance, |
129 PP_URLComponents_Dev* components) = 0; | 130 PP_URLComponents_Dev* components) = 0; |
130 virtual PP_Var GetPluginInstanceURL(PP_Instance instance, | 131 virtual PP_Var GetPluginInstanceURL(PP_Instance instance, |
131 PP_URLComponents_Dev* components) = 0; | 132 PP_URLComponents_Dev* components) = 0; |
132 #endif // !defined(OS_NACL) | 133 #endif // !defined(OS_NACL) |
133 | 134 |
134 static const ApiID kApiID = API_ID_PPB_INSTANCE; | 135 static const ApiID kApiID = API_ID_PPB_INSTANCE; |
135 }; | 136 }; |
136 | 137 |
137 } // namespace thunk | 138 } // namespace thunk |
138 } // namespace ppapi | 139 } // namespace ppapi |
139 | 140 |
140 #endif // PPAPI_THUNK_INSTANCE_API_H_ | 141 #endif // PPAPI_THUNK_INSTANCE_API_H_ |
OLD | NEW |