| 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 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 gfx::Rect clip_rect() const { return clip_rect_; } | 86 gfx::Rect clip_rect() const { return clip_rect_; } |
| 87 | 87 |
| 88 enum PluginQuirks { | 88 enum PluginQuirks { |
| 89 PLUGIN_QUIRK_SETWINDOW_TWICE = 1, | 89 PLUGIN_QUIRK_SETWINDOW_TWICE = 1, |
| 90 PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE = 2, | 90 PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE = 2, |
| 91 PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY = 4, | 91 PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY = 4, |
| 92 PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY = 8, | 92 PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY = 8, |
| 93 PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES = 16, | 93 PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES = 16, |
| 94 PLUGIN_QUIRK_DIE_AFTER_UNLOAD = 32, | 94 PLUGIN_QUIRK_DIE_AFTER_UNLOAD = 32, |
| 95 PLUGIN_QUIRK_PATCH_TRACKPOPUP_MENU = 64, | 95 PLUGIN_QUIRK_PATCH_TRACKPOPUP_MENU = 64, |
| 96 PLUGIN_QUIRK_PATCH_SETCURSOR = 128, |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 int quirks() { return quirks_; } | 99 int quirks() { return quirks_; } |
| 99 | 100 |
| 100 static void MoveWindow(HWND window, | 101 static void MoveWindow(HWND window, |
| 101 const gfx::Rect& window_rect, | 102 const gfx::Rect& window_rect, |
| 102 const gfx::Rect& clip_rect, | 103 const gfx::Rect& clip_rect, |
| 103 const std::vector<gfx::Rect>& cutout_rects, | 104 const std::vector<gfx::Rect>& cutout_rects, |
| 104 bool visible); | 105 bool visible); |
| 105 | 106 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // Runnable Method Factory used to invoke the OnUserGestureEnd method | 258 // Runnable Method Factory used to invoke the OnUserGestureEnd method |
| 258 // asynchronously. | 259 // asynchronously. |
| 259 ScopedRunnableMethodFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; | 260 ScopedRunnableMethodFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; |
| 260 | 261 |
| 261 // The url with which the plugin was instantiated. | 262 // The url with which the plugin was instantiated. |
| 262 std::string plugin_url_; | 263 std::string plugin_url_; |
| 263 | 264 |
| 264 // The plugin module handle. | 265 // The plugin module handle. |
| 265 HMODULE plugin_module_handle_; | 266 HMODULE plugin_module_handle_; |
| 266 | 267 |
| 267 // Indicates whether we IAT patched the TrackPopupMenu function. | 268 // Helper object for patching the TrackPopupMenu API |
| 268 static bool track_popup_menu_patched_; | 269 static iat_patch::IATPatchFunction iat_patch_track_popup_menu_; |
| 269 | |
| 270 // Helper object for patching the import table of Silverlight. | |
| 271 static iat_patch::IATPatchFunction iat_patch_helper_; | |
| 272 | 270 |
| 273 // TrackPopupMenu interceptor. Parameters are the same as the Win32 function | 271 // TrackPopupMenu interceptor. Parameters are the same as the Win32 function |
| 274 // TrackPopupMenu. | 272 // TrackPopupMenu. |
| 275 static BOOL WINAPI TrackPopupMenuPatch(HMENU menu, unsigned int flags, int x, | 273 static BOOL WINAPI TrackPopupMenuPatch(HMENU menu, unsigned int flags, int x, |
| 276 int y, int reserved, HWND window, | 274 int y, int reserved, HWND window, |
| 277 const RECT* rect); | 275 const RECT* rect); |
| 278 | 276 |
| 277 // SetCursor interceptor for windowless plugins. |
| 278 static HCURSOR WINAPI SetCursorPatch(HCURSOR cursor); |
| 279 |
| 280 // Helper object for patching the SetCursor API |
| 281 static iat_patch::IATPatchFunction iat_patch_set_cursor_; |
| 282 |
| 283 // Holds the current cursor set by the windowless plugin. |
| 284 WebCursor current_windowless_cursor_; |
| 285 |
| 279 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl); | 286 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl); |
| 280 }; | 287 }; |
| 281 | 288 |
| 282 #endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H__ | 289 #endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H__ |
| 283 | 290 |
| OLD | NEW |