| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/gfx/native_widget_types.h" | 11 #include "base/gfx/native_widget_types.h" |
| 12 #include "base/gfx/rect.h" | 12 #include "base/gfx/rect.h" |
| 13 #include "third_party/npapi/bindings/npapi.h" | 13 #include "third_party/npapi/bindings/npapi.h" |
| 14 | 14 |
| 15 typedef struct HDC__* HDC; | 15 typedef struct HDC__* HDC; |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 class WebPlugin; | 18 class WebPlugin; |
| 19 struct NPObject; | 19 struct NPObject; |
| 20 class WebCursor; | 20 class WebCursor; |
| 21 class WebPluginResourceClient; | 21 class WebPluginResourceClient; |
| 22 // This is the interface that a plugin implementation needs to provide. | 22 // This is the interface that a plugin implementation needs to provide. |
| 23 class WebPluginDelegate { | 23 class WebPluginDelegate { |
| 24 public: | 24 public: |
| 25 WebPluginDelegate() {} | 25 WebPluginDelegate() {} |
| 26 virtual ~WebPluginDelegate() {} |
| 26 | 27 |
| 27 // Initializes the plugin implementation with the given (UTF8) arguments. | 28 // Initializes the plugin implementation with the given (UTF8) arguments. |
| 28 // Note that the lifetime of WebPlugin must be longer than this delegate. | 29 // Note that the lifetime of WebPlugin must be longer than this delegate. |
| 29 // If this function returns false the plugin isn't started and shouldn't be | 30 // If this function returns false the plugin isn't started and shouldn't be |
| 30 // called again. If this method succeeds, then the WebPlugin is valid until | 31 // called again. If this method succeeds, then the WebPlugin is valid until |
| 31 // PluginDestroyed is called. | 32 // PluginDestroyed is called. |
| 32 // The load_manually parameter if true indicates that the plugin data would | 33 // The load_manually parameter if true indicates that the plugin data would |
| 33 // be passed from webkit. if false indicates that the plugin should download | 34 // be passed from webkit. if false indicates that the plugin should download |
| 34 // the data. This also controls whether the plugin is instantiated as a full | 35 // the data. This also controls whether the plugin is instantiated as a full |
| 35 // page plugin (NP_FULL) or embedded (NP_EMBED) | 36 // page plugin (NP_FULL) or embedded (NP_EMBED) |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void *notify_data) = 0; | 114 void *notify_data) = 0; |
| 114 // Notifies the delegate about a Get/Post URL request getting routed | 115 // Notifies the delegate about a Get/Post URL request getting routed |
| 115 virtual void URLRequestRouted(const std::string&url, bool notify_needed, | 116 virtual void URLRequestRouted(const std::string&url, bool notify_needed, |
| 116 void* notify_data) = 0; | 117 void* notify_data) = 0; |
| 117 private: | 118 private: |
| 118 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegate); | 119 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegate); |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H__ | 122 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H__ |
| 122 | 123 |
| OLD | NEW |