| 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_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/task.h" | 13 #include "base/task.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "base/timer.h" | 15 #include "base/timer.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "third_party/npapi/bindings/npapi.h" | 17 #include "third_party/npapi/bindings/npapi.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 19 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
| 20 #include "webkit/plugins/npapi/webplugin_delegate.h" | 20 #include "webkit/plugins/npapi/webplugin_delegate.h" |
| 21 #include "webkit/glue/webcursor.h" | 21 #include "webkit/glue/webcursor.h" |
| 22 #include "webkit/plugins/webkit_plugins_export.h" |
| 22 | 23 |
| 23 #if defined(OS_WIN) && !defined(USE_AURA) | 24 #if defined(OS_WIN) && !defined(USE_AURA) |
| 24 #include "base/memory/weak_ptr.h" | 25 #include "base/memory/weak_ptr.h" |
| 25 #endif | 26 #endif |
| 26 | 27 |
| 27 #if defined(USE_X11) | 28 #if defined(USE_X11) |
| 28 #include "ui/base/x/x11_util.h" | 29 #include "ui/base/x/x11_util.h" |
| 29 | 30 |
| 30 typedef struct _GdkDrawable GdkPixmap; | 31 typedef struct _GdkDrawable GdkPixmap; |
| 31 #endif | 32 #endif |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 class QuickDrawDrawingManager; | 55 class QuickDrawDrawingManager; |
| 55 #endif // NP_NO_QUICKDRAW | 56 #endif // NP_NO_QUICKDRAW |
| 56 #endif // OS_MACOSX | 57 #endif // OS_MACOSX |
| 57 | 58 |
| 58 #if defined(OS_WIN) && !defined(USE_AURA) | 59 #if defined(OS_WIN) && !defined(USE_AURA) |
| 59 class WebPluginIMEWin; | 60 class WebPluginIMEWin; |
| 60 #endif // OS_WIN | 61 #endif // OS_WIN |
| 61 | 62 |
| 62 // An implementation of WebPluginDelegate that runs in the plugin process, | 63 // An implementation of WebPluginDelegate that runs in the plugin process, |
| 63 // proxied from the renderer by WebPluginDelegateProxy. | 64 // proxied from the renderer by WebPluginDelegateProxy. |
| 64 class WebPluginDelegateImpl : public WebPluginDelegate { | 65 class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate { |
| 65 public: | 66 public: |
| 66 enum PluginQuirks { | 67 enum PluginQuirks { |
| 67 PLUGIN_QUIRK_SETWINDOW_TWICE = 1, // Win32 | 68 PLUGIN_QUIRK_SETWINDOW_TWICE = 1, // Win32 |
| 68 PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE = 2, // Win32 | 69 PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE = 2, // Win32 |
| 69 PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY = 4, // Win32 | 70 PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY = 4, // Win32 |
| 70 PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY = 8, // Win32 | 71 PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY = 8, // Win32 |
| 71 PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES = 16, // Win32 | 72 PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES = 16, // Win32 |
| 72 PLUGIN_QUIRK_DIE_AFTER_UNLOAD = 32, // Win32 | 73 PLUGIN_QUIRK_DIE_AFTER_UNLOAD = 32, // Win32 |
| 73 PLUGIN_QUIRK_PATCH_SETCURSOR = 64, // Win32 | 74 PLUGIN_QUIRK_PATCH_SETCURSOR = 64, // Win32 |
| 74 PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS = 128, // Win32 | 75 PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS = 128, // Win32 |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 // True if NPP_New did not return an error. | 553 // True if NPP_New did not return an error. |
| 553 bool creation_succeeded_; | 554 bool creation_succeeded_; |
| 554 | 555 |
| 555 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); | 556 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
| 556 }; | 557 }; |
| 557 | 558 |
| 558 } // namespace npapi | 559 } // namespace npapi |
| 559 } // namespace webkit | 560 } // namespace webkit |
| 560 | 561 |
| 561 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 562 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |