| 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 <string> | 8 #include <string> |
| 9 #include <list> | 9 #include <list> |
| 10 | 10 |
| 11 #include "base/iat_patch.h" |
| 11 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
| 12 #include "base/task.h" | 13 #include "base/task.h" |
| 13 #include "webkit/glue/webplugin_delegate.h" | 14 #include "webkit/glue/webplugin_delegate.h" |
| 14 #include "third_party/npapi/bindings/npapi.h" | 15 #include "third_party/npapi/bindings/npapi.h" |
| 15 #include "webkit/glue/webcursor.h" | 16 #include "webkit/glue/webcursor.h" |
| 16 | 17 |
| 17 namespace NPAPI { | 18 namespace NPAPI { |
| 18 class PluginInstance; | 19 class PluginInstance; |
| 19 }; | 20 }; |
| 20 | 21 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 gfx::Rect rect() const { return window_rect_; } | 83 gfx::Rect rect() const { return window_rect_; } |
| 83 gfx::Rect clip_rect() const { return clip_rect_; } | 84 gfx::Rect clip_rect() const { return clip_rect_; } |
| 84 | 85 |
| 85 enum PluginQuirks { | 86 enum PluginQuirks { |
| 86 PLUGIN_QUIRK_SETWINDOW_TWICE = 1, | 87 PLUGIN_QUIRK_SETWINDOW_TWICE = 1, |
| 87 PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE = 2, | 88 PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE = 2, |
| 88 PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY = 4, | 89 PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY = 4, |
| 89 PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY = 8, | 90 PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY = 8, |
| 90 PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES = 16, | 91 PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES = 16, |
| 91 PLUGIN_QUIRK_DIE_AFTER_UNLOAD = 32, | 92 PLUGIN_QUIRK_DIE_AFTER_UNLOAD = 32, |
| 93 PLUGIN_QUIRK_PATCH_TRACKPOPUP_MENU = 64, |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 int quirks() { return quirks_; } | 96 int quirks() { return quirks_; } |
| 95 | 97 |
| 96 static void MoveWindow(HWND window, | 98 static void MoveWindow(HWND window, |
| 97 const gfx::Rect& window_rect, | 99 const gfx::Rect& window_rect, |
| 98 const gfx::Rect& clip_rect, | 100 const gfx::Rect& clip_rect, |
| 99 const std::vector<gfx::Rect>& cutout_rects, | 101 const std::vector<gfx::Rect>& cutout_rects, |
| 100 bool visible); | 102 bool visible); |
| 101 | 103 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 // This flag indicates whether we started tracking a user gesture message. | 252 // This flag indicates whether we started tracking a user gesture message. |
| 251 bool user_gesture_message_posted_; | 253 bool user_gesture_message_posted_; |
| 252 | 254 |
| 253 // Runnable Method Factory used to invoke the OnUserGestureEnd method | 255 // Runnable Method Factory used to invoke the OnUserGestureEnd method |
| 254 // asynchronously. | 256 // asynchronously. |
| 255 ScopedRunnableMethodFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; | 257 ScopedRunnableMethodFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; |
| 256 | 258 |
| 257 // The url with which the plugin was instantiated. | 259 // The url with which the plugin was instantiated. |
| 258 std::string plugin_url_; | 260 std::string plugin_url_; |
| 259 | 261 |
| 262 // The plugin module handle. |
| 263 HMODULE plugin_module_handle_; |
| 264 |
| 265 // Indicates whether we IAT patched the TrackPopupMenu function. |
| 266 static bool track_popup_menu_patched_; |
| 267 |
| 268 // Helper object for patching the import table of Silverlight. |
| 269 static iat_patch::IATPatchFunction iat_patch_helper_; |
| 270 |
| 271 // TrackPopupMenu interceptor. Parameters are the same as the Win32 function |
| 272 // TrackPopupMenu. |
| 273 static BOOL WINAPI TrackPopupMenuPatch(HMENU menu, unsigned int flags, int x, |
| 274 int y, int reserved, HWND window, |
| 275 const RECT* rect); |
| 276 |
| 260 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl); | 277 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl); |
| 261 }; | 278 }; |
| 262 | 279 |
| 263 #endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H__ | 280 #endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H__ |
| 264 | 281 |
| OLD | NEW |