Index: webkit/glue/plugins/webplugin_delegate_impl.h |
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.h b/webkit/glue/plugins/webplugin_delegate_impl.h |
similarity index 95% |
rename from webkit/plugins/npapi/webplugin_delegate_impl.h |
rename to webkit/glue/plugins/webplugin_delegate_impl.h |
index 6937fe742e20c45c40c065900a88afad794a4c9c..4046c9508a0ce8a000bf26064e05dc768cf9bd1d 100644 |
--- a/webkit/plugins/npapi/webplugin_delegate_impl.h |
+++ b/webkit/glue/plugins/webplugin_delegate_impl.h |
@@ -2,8 +2,10 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
-#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
+#ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_DELEGATE_IMPL_H_ |
+#define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_DELEGATE_IMPL_H_ |
+ |
+#include "build/build_config.h" |
#include <string> |
#include <list> |
@@ -13,11 +15,10 @@ |
#include "base/task.h" |
#include "base/time.h" |
#include "base/timer.h" |
-#include "build/build_config.h" |
#include "gfx/native_widget_types.h" |
#include "gfx/rect.h" |
#include "third_party/npapi/bindings/npapi.h" |
-#include "webkit/plugins/npapi/webplugin_delegate.h" |
+#include "webkit/glue/plugins/webplugin_delegate.h" |
#include "webkit/glue/webcursor.h" |
#if defined(USE_X11) |
@@ -28,11 +29,19 @@ typedef struct _GdkDrawable GdkPixmap; |
class FilePath; |
+namespace NPAPI { |
+class PluginInstance; |
+} |
+ |
namespace WebKit { |
class WebMouseEvent; |
} |
#if defined(OS_MACOSX) |
+class ExternalDragTracker; |
+#ifndef NP_NO_QUICKDRAW |
+class QuickDrawDrawingManager; |
+#endif |
#ifdef __OBJC__ |
@class CALayer; |
@class CARenderer; |
@@ -40,24 +49,14 @@ class WebMouseEvent; |
class CALayer; |
class CARenderer; |
#endif |
-#endif |
- |
-namespace webkit { |
-namespace npapi { |
- |
-class PluginInstance; |
- |
-#if defined(OS_MACOSX) |
+namespace webkit_glue { |
class WebPluginAcceleratedSurface; |
-class ExternalDragTracker; |
-#ifndef NP_NO_QUICKDRAW |
-class QuickDrawDrawingManager; |
-#endif // NP_NO_QUICKDRAW |
-#endif // OS_MACOSX |
+} |
+#endif |
// An implementation of WebPluginDelegate that runs in the plugin process, |
// proxied from the renderer by WebPluginDelegateProxy. |
-class WebPluginDelegateImpl : public WebPluginDelegate { |
+class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate { |
public: |
enum PluginQuirks { |
PLUGIN_QUIRK_SETWINDOW_TWICE = 1, // Win32 |
@@ -95,7 +94,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate { |
virtual bool Initialize(const GURL& url, |
const std::vector<std::string>& arg_names, |
const std::vector<std::string>& arg_values, |
- WebPlugin* plugin, |
+ webkit_glue::WebPlugin* plugin, |
bool load_manually); |
virtual void PluginDestroyed(); |
virtual void UpdateGeometry(const gfx::Rect& window_rect, |
@@ -122,9 +121,9 @@ class WebPluginDelegateImpl : public WebPluginDelegate { |
virtual void DidFinishManualLoading(); |
virtual void DidManualLoadFail(); |
virtual void InstallMissingPlugin(); |
- virtual WebPluginResourceClient* CreateResourceClient( |
+ virtual webkit_glue::WebPluginResourceClient* CreateResourceClient( |
unsigned long resource_id, const GURL& url, int notify_id); |
- virtual WebPluginResourceClient* CreateSeekableResourceClient( |
+ virtual webkit_glue::WebPluginResourceClient* CreateSeekableResourceClient( |
unsigned long resource_id, int range_request_id); |
// End of WebPluginDelegate implementation. |
@@ -195,10 +194,10 @@ class WebPluginDelegateImpl : public WebPluginDelegate { |
private: |
friend class DeleteTask<WebPluginDelegateImpl>; |
- friend class WebPluginDelegate; |
+ friend class webkit_glue::WebPluginDelegate; |
WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view, |
- PluginInstance *instance); |
+ NPAPI::PluginInstance *instance); |
~WebPluginDelegateImpl(); |
// Called by Initialize() for platform-specific initialization. |
@@ -274,7 +273,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate { |
bool PlatformHandleInputEvent(const WebKit::WebInputEvent& event, |
WebKit::WebCursorInfo* cursor_info); |
- PluginInstance* instance() { return instance_.get(); } |
+ NPAPI::PluginInstance* instance() { return instance_.get(); } |
// Closes down and destroys our plugin instance. |
void DestroyInstance(); |
@@ -293,8 +292,8 @@ class WebPluginDelegateImpl : public WebPluginDelegate { |
// used by windowed and windowless plugins |
bool windowless_; |
- WebPlugin* plugin_; |
- scoped_refptr<PluginInstance> instance_; |
+ webkit_glue::WebPlugin* plugin_; |
+ scoped_refptr<NPAPI::PluginInstance> instance_; |
#if defined(OS_WIN) |
// Original wndproc before we subclassed. |
@@ -430,7 +429,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate { |
#endif |
CALayer* layer_; // Used for CA drawing mode. Weak, retained by plug-in. |
- WebPluginAcceleratedSurface* surface_; // Weak ref. |
+ webkit_glue::WebPluginAcceleratedSurface* surface_; // Weak ref. |
CARenderer* renderer_; // Renders layer_ to surface_. |
scoped_ptr<base::RepeatingTimer<WebPluginDelegateImpl> > redraw_timer_; |
@@ -509,7 +508,4 @@ class WebPluginDelegateImpl : public WebPluginDelegate { |
DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
}; |
-} // namespace npapi |
-} // namespace webkit |
- |
-#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
+#endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_DELEGATE_IMPL_H_ |