forked from mirrors/gecko-dev
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
This commit is contained in:
parent
2cf7aa1df8
commit
925ab3694e
2 changed files with 11 additions and 21 deletions
|
|
@ -9,10 +9,6 @@
|
||||||
|
|
||||||
#include "nsTString.h"
|
#include "nsTString.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(nsPluginHost, nsISupportsWeakReference)
|
|
||||||
|
|
||||||
nsPluginHost::SpecialType nsPluginHost::GetSpecialType(
|
nsPluginHost::SpecialType nsPluginHost::GetSpecialType(
|
||||||
const nsACString& aMIMEType) {
|
const nsACString& aMIMEType) {
|
||||||
if (aMIMEType.LowerCaseEqualsASCII("application/x-test")) {
|
if (aMIMEType.LowerCaseEqualsASCII("application/x-test")) {
|
||||||
|
|
|
||||||
|
|
@ -7,25 +7,19 @@
|
||||||
#define nsPluginHost_h_
|
#define nsPluginHost_h_
|
||||||
|
|
||||||
#include "nsStringFwd.h"
|
#include "nsStringFwd.h"
|
||||||
#include "nsWeakReference.h"
|
|
||||||
|
|
||||||
class nsPluginHost final : public nsSupportsWeakReference {
|
namespace nsPluginHost {
|
||||||
virtual ~nsPluginHost() = default;
|
|
||||||
|
|
||||||
public:
|
// checks whether aType is a type we recognize for potential special handling
|
||||||
nsPluginHost() = default;
|
enum SpecialType {
|
||||||
|
eSpecialType_None,
|
||||||
NS_DECL_ISUPPORTS
|
// Needed to whitelist for async init support
|
||||||
|
eSpecialType_Test,
|
||||||
// checks whether aType is a type we recognize for potential special handling
|
// Informs some decisions about OOP and quirks
|
||||||
enum SpecialType {
|
eSpecialType_Flash
|
||||||
eSpecialType_None,
|
|
||||||
// Needed to whitelist for async init support
|
|
||||||
eSpecialType_Test,
|
|
||||||
// Informs some decisions about OOP and quirks
|
|
||||||
eSpecialType_Flash
|
|
||||||
};
|
|
||||||
static SpecialType GetSpecialType(const nsACString& aMIMEType);
|
|
||||||
};
|
};
|
||||||
|
SpecialType GetSpecialType(const nsACString& aMIMEType);
|
||||||
|
|
||||||
|
} // namespace nsPluginHost
|
||||||
|
|
||||||
#endif // nsPluginHost_h_
|
#endif // nsPluginHost_h_
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue