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 WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "third_party/WebKit/public/platform/WebCanvas.h" | 13 #include "third_party/WebKit/public/platform/WebCanvas.h" |
14 #include "third_party/npapi/bindings/npapi.h" | 14 #include "third_party/npapi/bindings/npapi.h" |
15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
16 #include "webkit/common/cursors/webcursor.h" | 16 #include "webkit/common/cursors/webcursor.h" |
17 #include "webkit/plugins/webkit_plugins_export.h" | |
18 | 17 |
19 class GURL; | 18 class GURL; |
20 struct NPObject; | 19 struct NPObject; |
21 | 20 |
22 namespace WebKit { | 21 namespace WebKit { |
23 class WebInputEvent; | 22 class WebInputEvent; |
24 } | 23 } |
25 | 24 |
26 namespace gfx { | 25 namespace gfx { |
27 class Rect; | 26 class Rect; |
28 } | 27 } |
29 | 28 |
30 namespace webkit { | 29 namespace content { |
31 namespace npapi { | |
32 | 30 |
33 class WebPlugin; | 31 class WebPlugin; |
34 class WebPluginResourceClient; | 32 class WebPluginResourceClient; |
35 | 33 |
36 // This is the interface that a plugin implementation needs to provide. | 34 // This is the interface that a plugin implementation needs to provide. |
37 class WEBKIT_PLUGINS_EXPORT WebPluginDelegate { | 35 class WebPluginDelegate { |
38 public: | 36 public: |
39 virtual ~WebPluginDelegate() {} | 37 virtual ~WebPluginDelegate() {} |
40 | 38 |
41 // Initializes the plugin implementation with the given (UTF8) arguments. | 39 // Initializes the plugin implementation with the given (UTF8) arguments. |
42 // Note that the lifetime of WebPlugin must be longer than this delegate. | 40 // Note that the lifetime of WebPlugin must be longer than this delegate. |
43 // If this function returns false the plugin isn't started and shouldn't be | 41 // If this function returns false the plugin isn't started and shouldn't be |
44 // called again. If this method succeeds, then the WebPlugin is valid until | 42 // called again. If this method succeeds, then the WebPlugin is valid until |
45 // PluginDestroyed is called. | 43 // PluginDestroyed is called. |
46 // The load_manually parameter if true indicates that the plugin data would | 44 // The load_manually parameter if true indicates that the plugin data would |
47 // be passed from webkit. if false indicates that the plugin should download | 45 // be passed from webkit. if false indicates that the plugin should download |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 unsigned long resource_id, | 124 unsigned long resource_id, |
127 const GURL& url, | 125 const GURL& url, |
128 int notify_id) = 0; | 126 int notify_id) = 0; |
129 | 127 |
130 // Creates a WebPluginResourceClient instance for an existing stream that is | 128 // Creates a WebPluginResourceClient instance for an existing stream that is |
131 // has become seekable. | 129 // has become seekable. |
132 virtual WebPluginResourceClient* CreateSeekableResourceClient( | 130 virtual WebPluginResourceClient* CreateSeekableResourceClient( |
133 unsigned long resource_id, int range_request_id) = 0; | 131 unsigned long resource_id, int range_request_id) = 0; |
134 }; | 132 }; |
135 | 133 |
136 } // namespace npapi | 134 } // namespace content |
137 } // namespace webkit | |
138 | 135 |
139 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_ | 136 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
OLD | NEW |