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 #include <stdlib.h> | 5 #include <stdlib.h> |
6 #include <string.h> | 6 #include <string.h> |
7 | 7 |
8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 /* Got a resize, repaint the plugin. */ | 150 /* Got a resize, repaint the plugin. */ |
151 Repaint(info, &position->size); | 151 Repaint(info, &position->size); |
152 info->last_size.width = position->size.width; | 152 info->last_size.width = position->size.width; |
153 info->last_size.height = position->size.height; | 153 info->last_size.height = position->size.height; |
154 } | 154 } |
155 } | 155 } |
156 | 156 |
157 void Instance_DidChangeFocus(PP_Instance pp_instance, PP_Bool has_focus) { | 157 void Instance_DidChangeFocus(PP_Instance pp_instance, PP_Bool has_focus) { |
158 } | 158 } |
159 | 159 |
| 160 PP_Bool Instance_HandleInputEvent(PP_Instance pp_instance, |
| 161 const struct PP_InputEvent* event) { |
| 162 /* We don't handle any events. */ |
| 163 return PP_FALSE; |
| 164 } |
| 165 |
160 PP_Bool Instance_HandleDocumentLoad(PP_Instance pp_instance, | 166 PP_Bool Instance_HandleDocumentLoad(PP_Instance pp_instance, |
161 PP_Resource pp_url_loader) { | 167 PP_Resource pp_url_loader) { |
162 return PP_FALSE; | 168 return PP_FALSE; |
163 } | 169 } |
164 | 170 |
165 static struct PPP_Instance instance_interface = { | 171 static struct PPP_Instance instance_interface = { |
166 &Instance_DidCreate, | 172 &Instance_DidCreate, |
167 &Instance_DidDestroy, | 173 &Instance_DidDestroy, |
168 &Instance_DidChangeView, | 174 &Instance_DidChangeView, |
169 &Instance_DidChangeFocus, | 175 &Instance_DidChangeFocus, |
| 176 &Instance_HandleInputEvent, |
170 &Instance_HandleDocumentLoad | 177 &Instance_HandleDocumentLoad |
171 }; | 178 }; |
172 | 179 |
173 | 180 |
174 /* Global entrypoints --------------------------------------------------------*/ | 181 /* Global entrypoints --------------------------------------------------------*/ |
175 | 182 |
176 PP_EXPORT int32_t PPP_InitializeModule(PP_Module module, | 183 PP_EXPORT int32_t PPP_InitializeModule(PP_Module module, |
177 PPB_GetInterface get_browser_interface) { | 184 PPB_GetInterface get_browser_interface) { |
178 g_get_browser_interface = get_browser_interface; | 185 g_get_browser_interface = get_browser_interface; |
179 | 186 |
(...skipping 14 matching lines...) Expand all Loading... |
194 | 201 |
195 PP_EXPORT void PPP_ShutdownModule() { | 202 PP_EXPORT void PPP_ShutdownModule() { |
196 } | 203 } |
197 | 204 |
198 PP_EXPORT const void* PPP_GetInterface(const char* interface_name) { | 205 PP_EXPORT const void* PPP_GetInterface(const char* interface_name) { |
199 if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) | 206 if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) |
200 return &instance_interface; | 207 return &instance_interface; |
201 return NULL; | 208 return NULL; |
202 } | 209 } |
203 | 210 |
OLD | NEW |