2015-05-03 22:32:37 +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: */
|
2012-08-09 06:58:06 +04:00
|
|
|
/* 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/. */
|
|
|
|
|
2012-12-22 15:53:38 +04:00
|
|
|
#include "AppProcessChecker.h"
|
2013-11-05 14:14:46 +04:00
|
|
|
#include "nsIPermissionManager.h"
|
2012-08-09 06:58:06 +04:00
|
|
|
|
2013-11-06 21:16:56 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2013-11-05 14:14:46 +04:00
|
|
|
class PContentParent;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2013-11-06 21:16:56 +04:00
|
|
|
|
2013-11-05 14:14:46 +04:00
|
|
|
class nsIPrincipal;
|
2012-08-09 06:58:06 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2016-04-15 17:40:00 +03:00
|
|
|
#if DEBUG
|
|
|
|
#define LOG(...) printf_stderr(__VA_ARGS__)
|
2015-10-22 06:44:00 +03:00
|
|
|
#else
|
|
|
|
#define LOG(...)
|
|
|
|
#endif
|
|
|
|
|
2013-08-22 23:52:07 +04:00
|
|
|
bool
|
|
|
|
AssertAppProcess(mozilla::dom::PBrowserParent* aActor,
|
|
|
|
AssertAppProcessType aType,
|
|
|
|
const char* aCapability)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
AssertAppStatus(mozilla::dom::PBrowserParent* aActor,
|
|
|
|
unsigned short aStatus)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-10-24 04:30:00 +04:00
|
|
|
bool
|
|
|
|
AssertAppProcess(const mozilla::dom::TabContext& aContext,
|
|
|
|
AssertAppProcessType aType,
|
|
|
|
const char* aCapability)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
AssertAppStatus(const mozilla::dom::TabContext& aContext,
|
|
|
|
unsigned short aStatus)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-08-22 23:52:07 +04:00
|
|
|
|
|
|
|
bool
|
|
|
|
AssertAppProcess(mozilla::dom::PContentParent* aActor,
|
|
|
|
AssertAppProcessType aType,
|
|
|
|
const char* aCapability)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
AssertAppStatus(mozilla::dom::PContentParent* aActor,
|
|
|
|
unsigned short aStatus)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
AssertAppProcess(mozilla::hal_sandbox::PHalParent* aActor,
|
|
|
|
AssertAppProcessType aType,
|
|
|
|
const char* aCapability)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-11-05 14:14:46 +04:00
|
|
|
bool
|
2013-11-06 21:16:56 +04:00
|
|
|
AssertAppPrincipal(mozilla::dom::PContentParent* aActor,
|
2013-11-05 14:14:46 +04:00
|
|
|
nsIPrincipal* aPrincipal)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t
|
2013-11-06 21:16:56 +04:00
|
|
|
CheckPermission(mozilla::dom::PContentParent* aActor,
|
|
|
|
nsIPrincipal* aPrincipal,
|
|
|
|
const char* aPermission)
|
2013-11-05 14:14:46 +04:00
|
|
|
{
|
|
|
|
return nsIPermissionManager::ALLOW_ACTION;
|
|
|
|
}
|
|
|
|
|
2012-08-09 06:58:06 +04:00
|
|
|
} // namespace mozilla
|