fune/dom/plugins/base/nsPluginHost.cpp
Andrew McCreight 925ab3694e Bug 1859535, part 5 - Turn nsPluginHost into a namespace. r=dom-core,sefeng
Only a single static method is used, so turn it from a class
into a namespace.

Differential Revision: https://phabricator.services.mozilla.com/D191194
2023-11-20 17:44:21 +00:00

25 lines
869 B
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
/* nsPluginHost.cpp - top-level plugin management code */
#include "nsPluginHost.h"
#include "nsTString.h"
nsPluginHost::SpecialType nsPluginHost::GetSpecialType(
const nsACString& aMIMEType) {
if (aMIMEType.LowerCaseEqualsASCII("application/x-test")) {
return eSpecialType_Test;
}
if (aMIMEType.LowerCaseEqualsASCII("application/x-shockwave-flash") ||
aMIMEType.LowerCaseEqualsASCII("application/futuresplash") ||
aMIMEType.LowerCaseEqualsASCII("application/x-shockwave-flash-test")) {
return eSpecialType_Flash;
}
return eSpecialType_None;
}