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_PROXY_PPB_INSTANCE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
7 | 7 |
8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
(...skipping 29 matching lines...) Expand all Loading... | |
40 // InterfaceProxy implementation. | 40 // InterfaceProxy implementation. |
41 virtual bool OnMessageReceived(const IPC::Message& msg); | 41 virtual bool OnMessageReceived(const IPC::Message& msg); |
42 | 42 |
43 // FunctionGroupBase overrides. | 43 // FunctionGroupBase overrides. |
44 ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI() OVERRIDE; | 44 ppapi::thunk::PPB_Instance_FunctionAPI* AsPPB_Instance_FunctionAPI() OVERRIDE; |
45 | 45 |
46 // PPB_Instance_FunctionAPI implementation. | 46 // PPB_Instance_FunctionAPI implementation. |
47 virtual PP_Bool BindGraphics(PP_Instance instance, | 47 virtual PP_Bool BindGraphics(PP_Instance instance, |
48 PP_Resource device) OVERRIDE; | 48 PP_Resource device) OVERRIDE; |
49 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE; | 49 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE; |
50 virtual PP_Resource GetView(PP_Instance instance) OVERRIDE; | |
dmichael (off chromium)
2011/12/20 19:01:34
Should this still be here? You got rid of GetView
| |
51 virtual const ViewData* GetViewData(PP_Instance instance) OVERRIDE; | |
50 virtual PP_Var GetWindowObject(PP_Instance instance) OVERRIDE; | 52 virtual PP_Var GetWindowObject(PP_Instance instance) OVERRIDE; |
51 virtual PP_Var GetOwnerElementObject(PP_Instance instance) OVERRIDE; | 53 virtual PP_Var GetOwnerElementObject(PP_Instance instance) OVERRIDE; |
52 virtual PP_Var ExecuteScript(PP_Instance instance, | 54 virtual PP_Var ExecuteScript(PP_Instance instance, |
53 PP_Var script, | 55 PP_Var script, |
54 PP_Var* exception) OVERRIDE; | 56 PP_Var* exception) OVERRIDE; |
55 virtual PP_Var GetDefaultCharSet(PP_Instance instance) OVERRIDE; | 57 virtual PP_Var GetDefaultCharSet(PP_Instance instance) OVERRIDE; |
56 virtual void Log(PP_Instance instance, | 58 virtual void Log(PP_Instance instance, |
57 int log_level, | 59 int log_level, |
58 PP_Var value) OVERRIDE; | 60 PP_Var value) OVERRIDE; |
59 virtual void LogWithSource(PP_Instance instance, | 61 virtual void LogWithSource(PP_Instance instance, |
60 int log_level, | 62 int log_level, |
61 PP_Var source, | 63 PP_Var source, |
62 PP_Var value) OVERRIDE; | 64 PP_Var value) OVERRIDE; |
63 virtual void NumberOfFindResultsChanged(PP_Instance instance, | 65 virtual void NumberOfFindResultsChanged(PP_Instance instance, |
64 int32_t total, | 66 int32_t total, |
65 PP_Bool final_result) OVERRIDE; | 67 PP_Bool final_result) OVERRIDE; |
66 virtual void SelectedFindResultChanged(PP_Instance instance, | 68 virtual void SelectedFindResultChanged(PP_Instance instance, |
67 int32_t index) OVERRIDE; | 69 int32_t index) OVERRIDE; |
68 virtual PP_Bool IsFullscreen(PP_Instance instance) OVERRIDE; | |
69 virtual PP_Bool SetFullscreen(PP_Instance instance, | 70 virtual PP_Bool SetFullscreen(PP_Instance instance, |
70 PP_Bool fullscreen) OVERRIDE; | 71 PP_Bool fullscreen) OVERRIDE; |
71 virtual PP_Bool GetScreenSize(PP_Instance instance, | 72 virtual PP_Bool GetScreenSize(PP_Instance instance, |
72 PP_Size* size) OVERRIDE; | 73 PP_Size* size) OVERRIDE; |
73 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; | 74 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; |
74 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, | 75 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, |
75 PP_Bool fullscreen) OVERRIDE; | 76 PP_Bool fullscreen) OVERRIDE; |
76 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, PP_Size* size) | 77 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, PP_Size* size) |
77 OVERRIDE; | 78 OVERRIDE; |
78 virtual int32_t RequestInputEvents(PP_Instance instance, | 79 virtual int32_t RequestInputEvents(PP_Instance instance, |
(...skipping 20 matching lines...) Expand all Loading... | |
99 PP_URLComponents_Dev* components) OVERRIDE; | 100 PP_URLComponents_Dev* components) OVERRIDE; |
100 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; | 101 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; |
101 virtual int32_t LockMouse(PP_Instance instance, | 102 virtual int32_t LockMouse(PP_Instance instance, |
102 PP_CompletionCallback callback) OVERRIDE; | 103 PP_CompletionCallback callback) OVERRIDE; |
103 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; | 104 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; |
104 | 105 |
105 static const ApiID kApiID = API_ID_PPB_INSTANCE; | 106 static const ApiID kApiID = API_ID_PPB_INSTANCE; |
106 | 107 |
107 private: | 108 private: |
108 // Plugin -> Host message handlers. | 109 // Plugin -> Host message handlers. |
109 void OnMsgGetWindowObject(PP_Instance instance, | 110 void OnHostMsgGetWindowObject(PP_Instance instance, |
110 SerializedVarReturnValue result); | 111 SerializedVarReturnValue result); |
111 void OnMsgGetOwnerElementObject(PP_Instance instance, | 112 void OnHostMsgGetOwnerElementObject(PP_Instance instance, |
113 SerializedVarReturnValue result); | |
114 void OnHostMsgBindGraphics(PP_Instance instance, | |
115 const ppapi::HostResource& device, | |
116 PP_Bool* result); | |
117 void OnHostMsgIsFullFrame(PP_Instance instance, PP_Bool* result); | |
118 void OnHostMsgExecuteScript(PP_Instance instance, | |
119 SerializedVarReceiveInput script, | |
120 SerializedVarOutParam out_exception, | |
121 SerializedVarReturnValue result); | |
122 void OnHostMsgGetDefaultCharSet(PP_Instance instance, | |
112 SerializedVarReturnValue result); | 123 SerializedVarReturnValue result); |
113 void OnMsgBindGraphics(PP_Instance instance, | 124 void OnHostMsgLog(PP_Instance instance, |
114 const ppapi::HostResource& device, | 125 int log_level, |
115 PP_Bool* result); | 126 SerializedVarReceiveInput value); |
116 void OnMsgIsFullFrame(PP_Instance instance, PP_Bool* result); | 127 void OnHostMsgLogWithSource(PP_Instance instance, |
117 void OnMsgExecuteScript(PP_Instance instance, | 128 int log_level, |
118 SerializedVarReceiveInput script, | 129 SerializedVarReceiveInput source, |
119 SerializedVarOutParam out_exception, | 130 SerializedVarReceiveInput value); |
120 SerializedVarReturnValue result); | 131 void OnHostMsgSetFullscreen(PP_Instance instance, |
121 void OnMsgGetDefaultCharSet(PP_Instance instance, | 132 PP_Bool fullscreen, |
122 SerializedVarReturnValue result); | 133 PP_Bool* result); |
123 void OnMsgLog(PP_Instance instance, | 134 void OnHostMsgGetScreenSize(PP_Instance instance, |
124 int log_level, | 135 PP_Bool* result, |
125 SerializedVarReceiveInput value); | 136 PP_Size* size); |
126 void OnMsgLogWithSource(PP_Instance instance, | 137 void OnHostMsgFlashSetFullscreen(PP_Instance instance, |
127 int log_level, | 138 PP_Bool fullscreen, |
128 SerializedVarReceiveInput source, | 139 PP_Bool* result); |
129 SerializedVarReceiveInput value); | 140 void OnHostMsgFlashGetScreenSize(PP_Instance instance, |
130 void OnMsgSetFullscreen(PP_Instance instance, | 141 PP_Bool* result, |
131 PP_Bool fullscreen, | 142 PP_Size* size); |
132 PP_Bool* result); | 143 void OnHostMsgRequestInputEvents(PP_Instance instance, |
133 void OnMsgGetScreenSize(PP_Instance instance, | 144 bool is_filtering, |
134 PP_Bool* result, | 145 uint32_t event_classes); |
135 PP_Size* size); | 146 void OnHostMsgClearInputEvents(PP_Instance instance, |
136 void OnMsgFlashSetFullscreen(PP_Instance instance, | 147 uint32_t event_classes); |
137 PP_Bool fullscreen, | 148 void OnHostMsgPostMessage(PP_Instance instance, |
138 PP_Bool* result); | 149 SerializedVarReceiveInput message); |
139 void OnMsgFlashGetScreenSize(PP_Instance instance, | 150 void OnHostMsgLockMouse(PP_Instance instance); |
140 PP_Bool* result, | 151 void OnHostMsgUnlockMouse(PP_Instance instance); |
141 PP_Size* size); | 152 void OnHostMsgResolveRelativeToDocument(PP_Instance instance, |
142 void OnMsgRequestInputEvents(PP_Instance instance, | 153 SerializedVarReceiveInput relative, |
143 bool is_filtering, | 154 SerializedVarReturnValue result); |
144 uint32_t event_classes); | 155 void OnHostMsgDocumentCanRequest(PP_Instance instance, |
145 void OnMsgClearInputEvents(PP_Instance instance, | 156 SerializedVarReceiveInput url, |
146 uint32_t event_classes); | 157 PP_Bool* result); |
147 void OnMsgPostMessage(PP_Instance instance, | 158 void OnHostMsgDocumentCanAccessDocument(PP_Instance active, |
148 SerializedVarReceiveInput message); | 159 PP_Instance target, |
149 void OnMsgLockMouse(PP_Instance instance); | 160 PP_Bool* result); |
150 void OnMsgUnlockMouse(PP_Instance instance); | 161 void OnHostMsgGetDocumentURL(PP_Instance instance, |
151 void OnMsgResolveRelativeToDocument(PP_Instance instance, | 162 SerializedVarReturnValue result); |
152 SerializedVarReceiveInput relative, | 163 void OnHostMsgGetPluginInstanceURL(PP_Instance instance, |
153 SerializedVarReturnValue result); | 164 SerializedVarReturnValue result); |
154 void OnMsgDocumentCanRequest(PP_Instance instance, | |
155 SerializedVarReceiveInput url, | |
156 PP_Bool* result); | |
157 void OnMsgDocumentCanAccessDocument(PP_Instance active, | |
158 PP_Instance target, | |
159 PP_Bool* result); | |
160 void OnMsgGetDocumentURL(PP_Instance instance, | |
161 SerializedVarReturnValue result); | |
162 void OnMsgGetPluginInstanceURL(PP_Instance instance, | |
163 SerializedVarReturnValue result); | |
164 | 165 |
165 // Host -> Plugin message handlers. | 166 // Host -> Plugin message handlers. |
166 void OnMsgMouseLockComplete(PP_Instance instance, int32_t result); | 167 void OnPluginMsgMouseLockComplete(PP_Instance instance, int32_t result); |
167 | 168 |
168 void MouseLockCompleteInHost(int32_t result, PP_Instance instance); | 169 void MouseLockCompleteInHost(int32_t result, PP_Instance instance); |
169 | 170 |
170 pp::CompletionCallbackFactory<PPB_Instance_Proxy, | 171 pp::CompletionCallbackFactory<PPB_Instance_Proxy, |
171 ProxyNonThreadSafeRefCount> callback_factory_; | 172 ProxyNonThreadSafeRefCount> callback_factory_; |
172 }; | 173 }; |
173 | 174 |
174 } // namespace proxy | 175 } // namespace proxy |
175 } // namespace ppapi | 176 } // namespace ppapi |
176 | 177 |
177 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ | 178 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
OLD | NEW |