OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "gpu/gpu_plugin/gpu_plugin.h" | 5 #include "gpu/gpu_plugin/gpu_plugin.h" |
6 #include "webkit/glue/plugins/nphostapi.h" | 6 #include "webkit/glue/plugins/nphostapi.h" |
7 | 7 |
8 namespace gpu_plugin { | 8 namespace gpu_plugin { |
9 | 9 |
10 // Definitions of NPAPI plugin entry points. | 10 // Definitions of NPAPI plugin entry points. |
(...skipping 20 matching lines...) Expand all Loading... |
31 return NPERR_NO_ERROR; | 31 return NPERR_NO_ERROR; |
32 } | 32 } |
33 | 33 |
34 int16 NPP_HandleEvent(NPP instance, void* event) { | 34 int16 NPP_HandleEvent(NPP instance, void* event) { |
35 return 0; | 35 return 0; |
36 } | 36 } |
37 | 37 |
38 NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) { | 38 NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) { |
39 if (!instance) | 39 if (!instance) |
40 return NPERR_INVALID_INSTANCE_ERROR; | 40 return NPERR_INVALID_INSTANCE_ERROR; |
41 | 41 switch (variable) { |
42 return NPERR_GENERIC_ERROR; | 42 case NPPVpluginNeedsXEmbed: |
| 43 *static_cast<NPBool *>(value) = 1; |
| 44 return NPERR_NO_ERROR; |
| 45 default: |
| 46 return NPERR_INVALID_PARAM; |
| 47 } |
43 } | 48 } |
44 | 49 |
45 NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value) { | 50 NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value) { |
46 return NPERR_NO_ERROR; | 51 return NPERR_NO_ERROR; |
47 } | 52 } |
48 } | 53 } |
49 | 54 |
50 NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* funcs) { | 55 NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* funcs) { |
51 funcs->newp = NPP_New; | 56 funcs->newp = NPP_New; |
52 funcs->destroy = NPP_Destroy; | 57 funcs->destroy = NPP_Destroy; |
(...skipping 17 matching lines...) Expand all Loading... |
70 NP_GetEntryPoints(plugin_funcs); | 75 NP_GetEntryPoints(plugin_funcs); |
71 #endif | 76 #endif |
72 | 77 |
73 return NPERR_NO_ERROR; | 78 return NPERR_NO_ERROR; |
74 } | 79 } |
75 | 80 |
76 NPError API_CALL NP_Shutdown() { | 81 NPError API_CALL NP_Shutdown() { |
77 return NPERR_NO_ERROR; | 82 return NPERR_NO_ERROR; |
78 } | 83 } |
79 } // namespace gpu_plugin | 84 } // namespace gpu_plugin |
OLD | NEW |