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_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_url_util_dev.h" | 8 #include "ppapi/c/dev/ppb_url_util_dev.h" |
9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
10 #include "ppapi/c/ppb_instance.h" | 10 #include "ppapi/c/ppb_instance.h" |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_size.h" | 12 #include "ppapi/c/pp_size.h" |
13 #include "ppapi/c/private/ppb_instance_private.h" | 13 #include "ppapi/c/private/ppb_instance_private.h" |
14 #include "ppapi/shared_impl/api_id.h" | 14 #include "ppapi/shared_impl/api_id.h" |
15 | 15 |
16 // Windows headers interfere with this file. | 16 // Windows headers interfere with this file. |
17 #ifdef PostMessage | 17 #ifdef PostMessage |
18 #undef PostMessage | 18 #undef PostMessage |
19 #endif | 19 #endif |
20 | 20 |
21 namespace ppapi { | 21 namespace ppapi { |
| 22 |
| 23 struct ViewData; |
| 24 |
22 namespace thunk { | 25 namespace thunk { |
23 | 26 |
24 class PPB_Instance_FunctionAPI { | 27 class PPB_Instance_FunctionAPI { |
25 public: | 28 public: |
26 virtual ~PPB_Instance_FunctionAPI() {} | 29 virtual ~PPB_Instance_FunctionAPI() {} |
27 | 30 |
28 virtual PP_Bool BindGraphics(PP_Instance instance, PP_Resource device) = 0; | 31 virtual PP_Bool BindGraphics(PP_Instance instance, PP_Resource device) = 0; |
29 virtual PP_Bool IsFullFrame(PP_Instance instance) = 0; | 32 virtual PP_Bool IsFullFrame(PP_Instance instance) = 0; |
30 | 33 |
| 34 // Not an exposed PPAPI function, this returns the internal view data struct. |
| 35 virtual const ViewData* GetViewData(PP_Instance instance) = 0; |
| 36 |
31 // InstancePrivate. | 37 // InstancePrivate. |
32 virtual PP_Var GetWindowObject(PP_Instance instance) = 0; | 38 virtual PP_Var GetWindowObject(PP_Instance instance) = 0; |
33 virtual PP_Var GetOwnerElementObject(PP_Instance instance) = 0; | 39 virtual PP_Var GetOwnerElementObject(PP_Instance instance) = 0; |
34 virtual PP_Var ExecuteScript(PP_Instance instance, | 40 virtual PP_Var ExecuteScript(PP_Instance instance, |
35 PP_Var script, | 41 PP_Var script, |
36 PP_Var* exception) = 0; | 42 PP_Var* exception) = 0; |
37 | 43 |
38 // CharSet. | 44 // CharSet. |
39 virtual PP_Var GetDefaultCharSet(PP_Instance instance) = 0; | 45 virtual PP_Var GetDefaultCharSet(PP_Instance instance) = 0; |
40 | 46 |
41 // Console. | 47 // Console. |
42 virtual void Log(PP_Instance instance, | 48 virtual void Log(PP_Instance instance, |
43 int log_level, | 49 int log_level, |
44 PP_Var value) = 0; | 50 PP_Var value) = 0; |
45 virtual void LogWithSource(PP_Instance instance, | 51 virtual void LogWithSource(PP_Instance instance, |
46 int log_level, | 52 int log_level, |
47 PP_Var source, | 53 PP_Var source, |
48 PP_Var value) = 0; | 54 PP_Var value) = 0; |
49 | 55 |
50 // Find. | 56 // Find. |
51 virtual void NumberOfFindResultsChanged(PP_Instance instance, | 57 virtual void NumberOfFindResultsChanged(PP_Instance instance, |
52 int32_t total, | 58 int32_t total, |
53 PP_Bool final_result) = 0; | 59 PP_Bool final_result) = 0; |
54 virtual void SelectedFindResultChanged(PP_Instance instance, | 60 virtual void SelectedFindResultChanged(PP_Instance instance, |
55 int32_t index) = 0; | 61 int32_t index) = 0; |
56 | 62 |
57 // Fullscreen. | 63 // Fullscreen. |
58 virtual PP_Bool IsFullscreen(PP_Instance instance) = 0; | |
59 virtual PP_Bool SetFullscreen(PP_Instance instance, | 64 virtual PP_Bool SetFullscreen(PP_Instance instance, |
60 PP_Bool fullscreen) = 0; | 65 PP_Bool fullscreen) = 0; |
61 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) = 0; | 66 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) = 0; |
62 | 67 |
63 // FlashFullscreen. | 68 // FlashFullscreen. |
64 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) = 0; | 69 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) = 0; |
65 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, | 70 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, |
66 PP_Bool fullscreen) = 0; | 71 PP_Bool fullscreen) = 0; |
67 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, PP_Size* size) = 0; | 72 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, PP_Size* size) = 0; |
68 | 73 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 virtual PP_Var GetPluginInstanceURL(PP_Instance instance, | 106 virtual PP_Var GetPluginInstanceURL(PP_Instance instance, |
102 PP_URLComponents_Dev* components) = 0; | 107 PP_URLComponents_Dev* components) = 0; |
103 | 108 |
104 static const ApiID kApiID = API_ID_PPB_INSTANCE; | 109 static const ApiID kApiID = API_ID_PPB_INSTANCE; |
105 }; | 110 }; |
106 | 111 |
107 } // namespace thunk | 112 } // namespace thunk |
108 } // namespace ppapi | 113 } // namespace ppapi |
109 | 114 |
110 #endif // PPAPI_THUNK_INSTANCE_API_H_ | 115 #endif // PPAPI_THUNK_INSTANCE_API_H_ |
OLD | NEW |