LCOV - code coverage report
Current view: top level - dom/plugins/ipc - PluginQuirks.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 6 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
       2             :  * vim: sw=4 ts=4 et :
       3             :  * This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       5             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #include "PluginQuirks.h"
       8             : 
       9             : #include "nsPluginHost.h"
      10             : 
      11             : namespace mozilla {
      12             : namespace plugins {
      13             : 
      14           0 : int GetQuirksFromMimeTypeAndFilename(const nsCString& aMimeType,
      15             :                                      const nsCString& aPluginFilename)
      16             : {
      17           0 :     int quirks = 0;
      18             : 
      19           0 :     nsPluginHost::SpecialType specialType = nsPluginHost::GetSpecialType(aMimeType);
      20             : 
      21           0 :     if (specialType == nsPluginHost::eSpecialType_Flash) {
      22           0 :         quirks |= QUIRK_FLASH_RETURN_EMPTY_DOCUMENT_ORIGIN;
      23             : #ifdef OS_WIN
      24             :         quirks |= QUIRK_WINLESS_TRACKPOPUP_HOOK;
      25             :         quirks |= QUIRK_FLASH_THROTTLE_WMUSER_EVENTS;
      26             :         quirks |= QUIRK_FLASH_HOOK_SETLONGPTR;
      27             :         quirks |= QUIRK_FLASH_HOOK_GETWINDOWINFO;
      28             :         quirks |= QUIRK_FLASH_FIXUP_MOUSE_CAPTURE;
      29             :         quirks |= QUIRK_WINLESS_HOOK_IME;
      30             : #if defined(_M_X64) || defined(__x86_64__)
      31             :         quirks |= QUIRK_FLASH_HOOK_GETKEYSTATE;
      32             : #endif
      33             : #endif
      34             :     }
      35             : 
      36             : #ifdef XP_MACOSX
      37             :     // Whitelist Flash to support offline renderer.
      38             :     if (specialType == nsPluginHost::eSpecialType_Flash) {
      39             :         quirks |= QUIRK_ALLOW_OFFLINE_RENDERER;
      40             :     }
      41             : #endif
      42             : 
      43             : #ifdef OS_WIN
      44             :     if (specialType == nsPluginHost::eSpecialType_Test) {
      45             :         quirks |= QUIRK_WINLESS_HOOK_IME;
      46             :     }
      47             : #endif
      48             : 
      49           0 :     return quirks;
      50             : }
      51             : 
      52             : } /* namespace plugins */
      53             : } /* namespace mozilla */

Generated by: LCOV version 1.13