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 #ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_ |
6 #define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_ | 6 #define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "third_party/npapi/bindings/npapi_extensions.h" | 9 #include "third_party/npapi/bindings/npapi_extensions.h" |
10 | 10 |
11 namespace webkit_glue { | 11 namespace webkit_glue { |
12 | 12 |
13 // Interface for the NPAPI 2D device extension. This class implements "NOP" | 13 // Interface for the NPAPI 2D device extension. This class implements "NOP" |
14 // versions of all these functions so it can be used seamlessly by the | 14 // versions of all these functions so it can be used seamlessly by the |
15 // "regular" plugin delegate while being overridden by the "pepper" one. | 15 // "regular" plugin delegate while being overridden by the "pepper" one. |
16 class WebPlugin2DDeviceDelegate { | 16 class WebPlugin2DDeviceDelegate { |
17 public: | 17 public: |
18 virtual NPError Device2DQueryCapability(int32 capability, int32* value) { | 18 virtual NPError Device2DQueryCapability(int32 capability, int32* value); |
19 return NPERR_GENERIC_ERROR; | |
20 } | |
21 virtual NPError Device2DQueryConfig(const NPDeviceContext2DConfig* request, | 19 virtual NPError Device2DQueryConfig(const NPDeviceContext2DConfig* request, |
22 NPDeviceContext2DConfig* obtain) { | 20 NPDeviceContext2DConfig* obtain); |
23 return NPERR_GENERIC_ERROR; | |
24 } | |
25 virtual NPError Device2DInitializeContext( | 21 virtual NPError Device2DInitializeContext( |
26 const NPDeviceContext2DConfig* config, | 22 const NPDeviceContext2DConfig* config, |
27 NPDeviceContext2D* context) { | 23 NPDeviceContext2D* context); |
28 return NPERR_GENERIC_ERROR; | |
29 } | |
30 virtual NPError Device2DSetStateContext(NPDeviceContext2D* context, | 24 virtual NPError Device2DSetStateContext(NPDeviceContext2D* context, |
31 int32 state, | 25 int32 state, |
32 intptr_t value) { | 26 intptr_t value); |
33 return NPERR_GENERIC_ERROR; | |
34 } | |
35 virtual NPError Device2DGetStateContext(NPDeviceContext2D* context, | 27 virtual NPError Device2DGetStateContext(NPDeviceContext2D* context, |
36 int32 state, | 28 int32 state, |
37 intptr_t* value) { | 29 intptr_t* value); |
38 return NPERR_GENERIC_ERROR; | |
39 } | |
40 virtual NPError Device2DFlushContext(NPP id, | 30 virtual NPError Device2DFlushContext(NPP id, |
41 NPDeviceContext2D* context, | 31 NPDeviceContext2D* context, |
42 NPDeviceFlushContextCallbackPtr callback, | 32 NPDeviceFlushContextCallbackPtr callback, |
43 void* user_data) { | 33 void* user_data); |
44 return NPERR_GENERIC_ERROR; | 34 virtual NPError Device2DDestroyContext(NPDeviceContext2D* context); |
45 } | |
46 virtual NPError Device2DDestroyContext(NPDeviceContext2D* context) { | |
47 return NPERR_GENERIC_ERROR; | |
48 } | |
49 | 35 |
50 protected: | 36 protected: |
51 WebPlugin2DDeviceDelegate() {} | 37 WebPlugin2DDeviceDelegate() {} |
52 virtual ~WebPlugin2DDeviceDelegate() {} | 38 virtual ~WebPlugin2DDeviceDelegate() {} |
53 }; | 39 }; |
54 | 40 |
55 } // namespace webkit_glue | 41 } // namespace webkit_glue |
56 | 42 |
57 #endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_ | 43 #endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_ |
OLD | NEW |