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_WEBPLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_ |
6 #define WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_ | 6 #define WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "app/gfx/native_widget_types.h" | 11 #include "app/gfx/native_widget_types.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "third_party/npapi/bindings/npapi.h" | 14 #include "third_party/npapi/bindings/npapi.h" |
15 #include "webkit/glue/pepper/pepper.h" | 15 #include "third_party/npapi/bindings/npapi_extensions.h" |
16 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" |
17 | 17 |
18 class FilePath; | 18 class FilePath; |
19 class GURL; | 19 class GURL; |
20 struct NPObject; | 20 struct NPObject; |
21 | 21 |
22 namespace WebKit { | 22 namespace WebKit { |
23 class WebInputEvent; | 23 class WebInputEvent; |
24 struct WebCursorInfo; | 24 struct WebCursorInfo; |
25 } | 25 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Only supported when the plugin is the default plugin. | 120 // Only supported when the plugin is the default plugin. |
121 virtual void InstallMissingPlugin() = 0; | 121 virtual void InstallMissingPlugin() = 0; |
122 | 122 |
123 // Creates a WebPluginResourceClient instance and returns the same. | 123 // Creates a WebPluginResourceClient instance and returns the same. |
124 virtual WebPluginResourceClient* CreateResourceClient(int resource_id, | 124 virtual WebPluginResourceClient* CreateResourceClient(int resource_id, |
125 const GURL& url, | 125 const GURL& url, |
126 bool notify_needed, | 126 bool notify_needed, |
127 intptr_t notify_data, | 127 intptr_t notify_data, |
128 intptr_t stream) = 0; | 128 intptr_t stream) = 0; |
129 | 129 |
130 // The following two methods are for use in implementing Pepper renderers. | 130 // The following methods are for use in implementing Pepper renderers. |
131 // They should not be called outside of that context. | 131 // They should not be called outside of that context. |
132 virtual NPError InitializeRenderContext(NPRenderType type, | 132 |
133 NPRenderContext* context) { | 133 // Pepper 2D device API. |
| 134 virtual NPError Device2DQueryCapability(int32 capability, int32* value) { |
134 return NPERR_GENERIC_ERROR; | 135 return NPERR_GENERIC_ERROR; |
135 } | 136 } |
136 | 137 virtual NPError Device2DQueryConfig(const NPDeviceContext2DConfig* request, |
137 virtual NPError DestroyRenderContext(NPRenderContext* context) { | 138 NPDeviceContext2DConfig* obtain) { |
138 return NPERR_GENERIC_ERROR; | 139 return NPERR_GENERIC_ERROR; |
139 } | 140 } |
140 | 141 virtual NPError Device2DInitializeContext( |
141 virtual NPError FlushRenderContext(NPRenderContext* context) { | 142 const NPDeviceContext2DConfig* config, |
| 143 NPDeviceContext2D* context) { |
142 return NPERR_GENERIC_ERROR; | 144 return NPERR_GENERIC_ERROR; |
143 } | 145 } |
144 | 146 virtual NPError Device2DSetStateContext(NPDeviceContext2D* context, |
145 virtual NPError OpenFileInSandbox(const char* file_name, void** handle) { | 147 int32 state, |
| 148 int32 value) { |
| 149 return NPERR_GENERIC_ERROR; |
| 150 } |
| 151 virtual NPError Device2DGetStateContext(NPDeviceContext2D* context, |
| 152 int32 state, |
| 153 int32* value) { |
| 154 return NPERR_GENERIC_ERROR; |
| 155 } |
| 156 virtual NPError Device2DFlushContext(NPDeviceContext2D* context, |
| 157 NPDeviceFlushContextCallbackPtr callback, |
| 158 void* user_data) { |
| 159 return NPERR_GENERIC_ERROR; |
| 160 } |
| 161 virtual NPError Device2DDestroyContext(NPDeviceContext2D* context) { |
146 return NPERR_GENERIC_ERROR; | 162 return NPERR_GENERIC_ERROR; |
147 } | 163 } |
148 }; | 164 }; |
149 | 165 |
150 } // namespace webkit_glue | 166 } // namespace webkit_glue |
151 | 167 |
152 #endif // WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_ | 168 #endif // WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_ |
OLD | NEW |