summaryrefslogtreecommitdiffstats
path: root/dom/plugins/ipc/PluginQuirks.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/plugins/ipc/PluginQuirks.h')
-rw-r--r--dom/plugins/ipc/PluginQuirks.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/dom/plugins/ipc/PluginQuirks.h b/dom/plugins/ipc/PluginQuirks.h
new file mode 100644
index 0000000000..852ebb6b7a
--- /dev/null
+++ b/dom/plugins/ipc/PluginQuirks.h
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: sw=2 ts=4 et :
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef dom_plugins_PluginQuirks_h
+#define dom_plugins_PluginQuirks_h
+
+#include "nsString.h"
+
+namespace mozilla {
+namespace plugins {
+
+// Quirks mode support for various plugin mime types
+enum PluginQuirks {
+ QUIRKS_NOT_INITIALIZED = 0,
+ // Win32: Hook TrackPopupMenu api so that we can swap out parent
+ // hwnds. The api will fail with parents not associated with our
+ // child ui thread. See WinlessHandleEvent for details.
+ QUIRK_WINLESS_TRACKPOPUP_HOOK = 1 << 1,
+ // Win32: Throttle flash WM_USER+1 heart beat messages to prevent
+ // flooding chromium's dispatch loop, which can cause ipc traffic
+ // processing lag.
+ QUIRK_FLASH_THROTTLE_WMUSER_EVENTS = 1 << 2,
+ // Win32: Catch resets on our subclass by hooking SetWindowLong.
+ QUIRK_FLASH_HOOK_SETLONGPTR = 1 << 3,
+ // X11: Work around a bug in Flash up to 10.1 d51 at least, where
+ // expose event top left coordinates within the plugin-rect and
+ // not at the drawable origin are misinterpreted.
+ QUIRK_FLASH_EXPOSE_COORD_TRANSLATION = 1 << 4,
+ // Win32: Catch get window info calls on the browser and tweak the
+ // results so mouse input works when flash is displaying it's settings
+ // window.
+ QUIRK_FLASH_HOOK_GETWINDOWINFO = 1 << 5,
+ // Win: Addresses a flash bug with mouse capture and full screen
+ // windows.
+ QUIRK_FLASH_FIXUP_MOUSE_CAPTURE = 1 << 6,
+ // Mac: Allow the plugin to use offline renderer mode.
+ // Use this only if the plugin is certified the support the offline renderer.
+ QUIRK_ALLOW_OFFLINE_RENDERER = 1 << 9,
+ // Work around a Flash bug where it fails to check the error code of a
+ // NPN_GetValue(NPNVdocumentOrigin) call before trying to dereference
+ // its char* output.
+ QUIRK_FLASH_RETURN_EMPTY_DOCUMENT_ORIGIN = 1 << 10,
+ // Win: Hook IMM32 API to handle IME event on windowless plugin
+ QUIRK_WINLESS_HOOK_IME = 1 << 12,
+ // Win: Hook GetKeyState to get keyboard state on sandbox process
+ QUIRK_FLASH_HOOK_GETKEYSTATE = 1 << 13,
+ // Win: Hook PrintDlgW to show print settings dialog on sandbox process
+ QUIRK_FLASH_HOOK_PRINTDLGW = 1 << 14,
+ // Win: Broker Win32 SSL operations
+ QUIRK_FLASH_HOOK_SSL = 1 << 15,
+ // Win: Hook CreateMutexW for brokering when using the camera
+ QUIRK_FLASH_HOOK_CREATEMUTEXW = 1 << 16,
+};
+
+int GetQuirksFromMimeTypeAndFilename(const nsCString& aMimeType,
+ const nsCString& aPluginFilename);
+
+} /* namespace plugins */
+} /* namespace mozilla */
+
+#endif // ifndef dom_plugins_PluginQuirks_h