| 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_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ |
| 6 #define WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ | 6 #define WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <list> | 11 #include <list> |
| 12 | 12 |
| 13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
| 14 #include "base/gfx/native_widget_types.h" | 14 #include "base/gfx/native_widget_types.h" |
| 15 #include "base/gfx/rect.h" | 15 #include "base/gfx/rect.h" |
| 16 #include "base/ref_counted.h" | 16 #include "base/ref_counted.h" |
| 17 #include "base/task.h" | 17 #include "base/task.h" |
| 18 #include "third_party/npapi/bindings/npapi.h" | 18 #include "third_party/npapi/bindings/npapi.h" |
| 19 #include "webkit/glue/webcursor.h" |
| 19 #include "webkit/glue/webplugin_delegate.h" | 20 #include "webkit/glue/webplugin_delegate.h" |
| 20 #include "webkit/glue/webcursor.h" | |
| 21 | 21 |
| 22 #if defined(OS_LINUX) | 22 #if defined(OS_LINUX) |
| 23 typedef struct _GdkDrawable GdkPixmap; | 23 typedef struct _GdkDrawable GdkPixmap; |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 namespace NPAPI { | 26 namespace NPAPI { |
| 27 class PluginInstance; | 27 class PluginInstance; |
| 28 }; | 28 } |
| 29 | 29 |
| 30 // An implementation of WebPluginDelegate that proxies all calls to | 30 // An implementation of WebPluginDelegate that proxies all calls to |
| 31 // the plugin process. | 31 // the plugin process. |
| 32 class WebPluginDelegateImpl : public WebPluginDelegate { | 32 class WebPluginDelegateImpl : public WebPluginDelegate { |
| 33 public: | 33 public: |
| 34 static bool IsPluginDelegateWindow(gfx::NativeWindow window); | 34 static bool IsPluginDelegateWindow(gfx::NativeWindow window); |
| 35 static bool GetPluginNameFromWindow(gfx::NativeWindow window, | 35 static bool GetPluginNameFromWindow(gfx::NativeWindow window, |
| 36 std::wstring *plugin_name); | 36 std::wstring *plugin_name); |
| 37 | 37 |
| 38 // Returns true if the window handle passed in is that of the dummy | 38 // Returns true if the window handle passed in is that of the dummy |
| (...skipping 10 matching lines...) Expand all Loading... |
| 49 bool load_manually); | 49 bool load_manually); |
| 50 virtual void UpdateGeometry(const gfx::Rect& window_rect, | 50 virtual void UpdateGeometry(const gfx::Rect& window_rect, |
| 51 const gfx::Rect& clip_rect); | 51 const gfx::Rect& clip_rect); |
| 52 virtual void Paint(gfx::NativeDrawingContext context, const gfx::Rect& rect); | 52 virtual void Paint(gfx::NativeDrawingContext context, const gfx::Rect& rect); |
| 53 virtual void Print(gfx::NativeDrawingContext context); | 53 virtual void Print(gfx::NativeDrawingContext context); |
| 54 | 54 |
| 55 virtual void SetFocus(); // only called when windowless | 55 virtual void SetFocus(); // only called when windowless |
| 56 // only called when windowless | 56 // only called when windowless |
| 57 // See NPAPI NPP_HandleEvent for more information. | 57 // See NPAPI NPP_HandleEvent for more information. |
| 58 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, | 58 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, |
| 59 WebCursor* cursor); | 59 WebKit::WebCursorInfo* cursor); |
| 60 virtual NPObject* GetPluginScriptableObject(); | 60 virtual NPObject* GetPluginScriptableObject(); |
| 61 virtual void DidFinishLoadWithReason(NPReason reason); | 61 virtual void DidFinishLoadWithReason(NPReason reason); |
| 62 virtual int GetProcessId(); | 62 virtual int GetProcessId(); |
| 63 | 63 |
| 64 virtual void SendJavaScriptStream(const std::string& url, | 64 virtual void SendJavaScriptStream(const std::string& url, |
| 65 const std::wstring& result, | 65 const std::wstring& result, |
| 66 bool success, bool notify_needed, | 66 bool success, bool notify_needed, |
| 67 intptr_t notify_data); | 67 intptr_t notify_data); |
| 68 virtual void DidReceiveManualResponse(const std::string& url, | 68 virtual void DidReceiveManualResponse(const std::string& url, |
| 69 const std::string& mime_type, | 69 const std::string& mime_type, |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 // Holds the current cursor set by the windowless plugin. | 273 // Holds the current cursor set by the windowless plugin. |
| 274 WebCursor current_windowless_cursor_; | 274 WebCursor current_windowless_cursor_; |
| 275 | 275 |
| 276 friend class WebPluginDelegate; | 276 friend class WebPluginDelegate; |
| 277 | 277 |
| 278 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl); | 278 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl); |
| 279 }; | 279 }; |
| 280 | 280 |
| 281 #endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ | 281 #endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |