| 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 <list> | 9 #include <list> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW = 256, // Linux | 71 PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW = 256, // Linux |
| 72 PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW = 512, // Linux | 72 PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW = 512, // Linux |
| 73 PLUGIN_QUIRK_NO_WINDOWLESS = 1024, // Windows | 73 PLUGIN_QUIRK_NO_WINDOWLESS = 1024, // Windows |
| 74 PLUGIN_QUIRK_PATCH_REGENUMKEYEXW = 2048, // Windows | 74 PLUGIN_QUIRK_PATCH_REGENUMKEYEXW = 2048, // Windows |
| 75 PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS = 4096, // Windows | 75 PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS = 4096, // Windows |
| 76 PLUGIN_QUIRK_ALLOW_FASTER_QUICKDRAW_PATH = 8192, // Mac | 76 PLUGIN_QUIRK_ALLOW_FASTER_QUICKDRAW_PATH = 8192, // Mac |
| 77 PLUGIN_QUIRK_HANDLE_MOUSE_CAPTURE = 16384, // Windows | 77 PLUGIN_QUIRK_HANDLE_MOUSE_CAPTURE = 16384, // Windows |
| 78 PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK = 32768, // Linux | 78 PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK = 32768, // Linux |
| 79 PLUGIN_QUIRK_IGNORE_FIRST_SETWINDOW_CALL = 65536, // Windows. | 79 PLUGIN_QUIRK_IGNORE_FIRST_SETWINDOW_CALL = 65536, // Windows. |
| 80 PLUGIN_QUIRK_REPARENT_IN_BROWSER = 131072, // Windows | 80 PLUGIN_QUIRK_REPARENT_IN_BROWSER = 131072, // Windows |
| 81 PLUGIN_QUIRK_PATCH_GETKEYSTATE = 262144, // Windows |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 static WebPluginDelegateImpl* Create(const FilePath& filename, | 84 static WebPluginDelegateImpl* Create(const FilePath& filename, |
| 84 const std::string& mime_type, | 85 const std::string& mime_type, |
| 85 gfx::PluginWindowHandle containing_view); | 86 gfx::PluginWindowHandle containing_view); |
| 86 | 87 |
| 87 static bool IsPluginDelegateWindow(gfx::NativeWindow window); | 88 static bool IsPluginDelegateWindow(gfx::NativeWindow window); |
| 88 static bool GetPluginNameFromWindow(gfx::NativeWindow window, | 89 static bool GetPluginNameFromWindow(gfx::NativeWindow window, |
| 89 string16* plugin_name); | 90 string16* plugin_name); |
| 90 | 91 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 369 |
| 369 // TrackPopupMenu interceptor. Parameters are the same as the Win32 function | 370 // TrackPopupMenu interceptor. Parameters are the same as the Win32 function |
| 370 // TrackPopupMenu. | 371 // TrackPopupMenu. |
| 371 static BOOL WINAPI TrackPopupMenuPatch(HMENU menu, unsigned int flags, int x, | 372 static BOOL WINAPI TrackPopupMenuPatch(HMENU menu, unsigned int flags, int x, |
| 372 int y, int reserved, HWND window, | 373 int y, int reserved, HWND window, |
| 373 const RECT* rect); | 374 const RECT* rect); |
| 374 | 375 |
| 375 // SetCursor interceptor for windowless plugins. | 376 // SetCursor interceptor for windowless plugins. |
| 376 static HCURSOR WINAPI SetCursorPatch(HCURSOR cursor); | 377 static HCURSOR WINAPI SetCursorPatch(HCURSOR cursor); |
| 377 | 378 |
| 379 // GetKeyStatePatch interceptor for UIPI Flash plugin. |
| 380 static SHORT WINAPI GetKeyStatePatch(int vkey); |
| 381 |
| 378 // RegEnumKeyExW interceptor. | 382 // RegEnumKeyExW interceptor. |
| 379 static LONG WINAPI RegEnumKeyExWPatch( | 383 static LONG WINAPI RegEnumKeyExWPatch( |
| 380 HKEY key, DWORD index, LPWSTR name, LPDWORD name_size, LPDWORD reserved, | 384 HKEY key, DWORD index, LPWSTR name, LPDWORD name_size, LPDWORD reserved, |
| 381 LPWSTR class_name, LPDWORD class_size, PFILETIME last_write_time); | 385 LPWSTR class_name, LPDWORD class_size, PFILETIME last_write_time); |
| 382 | 386 |
| 383 // The mouse hook proc which handles mouse capture in windowed plugins. | 387 // The mouse hook proc which handles mouse capture in windowed plugins. |
| 384 static LRESULT CALLBACK MouseHookProc(int code, WPARAM wParam, | 388 static LRESULT CALLBACK MouseHookProc(int code, WPARAM wParam, |
| 385 LPARAM lParam); | 389 LPARAM lParam); |
| 386 | 390 |
| 387 // Calls SetCapture/ReleaseCapture based on the message type. | 391 // Calls SetCapture/ReleaseCapture based on the message type. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 // True if NPP_New did not return an error. | 517 // True if NPP_New did not return an error. |
| 514 bool creation_succeeded_; | 518 bool creation_succeeded_; |
| 515 | 519 |
| 516 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); | 520 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
| 517 }; | 521 }; |
| 518 | 522 |
| 519 } // namespace npapi | 523 } // namespace npapi |
| 520 } // namespace webkit | 524 } // namespace webkit |
| 521 | 525 |
| 522 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 526 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |