2016-02-20 03:49:30 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
2016-05-28 01:43:05 +03:00
|
|
|
#ifndef addonmanagerwebapi_h_
|
|
|
|
#define addonmanagerwebapi_h_
|
|
|
|
|
2016-02-20 03:49:30 +03:00
|
|
|
#include "nsPIDOMWindow.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
class AddonManagerWebAPI {
|
|
|
|
public:
|
2018-07-12 17:17:44 +03:00
|
|
|
static bool IsAPIEnabled(JSContext* aCx, JSObject* aGlobal);
|
2016-02-20 03:49:30 +03:00
|
|
|
|
|
|
|
static bool IsValidSite(nsIURI* uri);
|
|
|
|
};
|
|
|
|
|
2016-10-29 00:39:18 +03:00
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class AddonManagerPermissions {
|
|
|
|
public:
|
|
|
|
static bool IsHostPermitted(const GlobalObject&, const nsAString& host);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
|
2016-02-20 03:49:30 +03:00
|
|
|
} // namespace mozilla
|
2016-05-28 01:43:05 +03:00
|
|
|
|
|
|
|
#endif // addonmanagerwebapi_h_
|