Bug 1259590 - Remove B2G ACL code. r=khuey

This commit is contained in:
William Chen 2016-04-07 09:50:01 -07:00
Родитель 92b0ad8df1
Коммит 303bd1fd42
31 изменённых файлов: 22 добавлений и 387 удалений

Просмотреть файл

@ -487,11 +487,6 @@ this.PermissionsTable = { geolocation: {
privileged: DENY_ACTION,
certified: ALLOW_ACTION
},
"external-app": {
app: DENY_ACTION,
privileged: ALLOW_ACTION,
certified: ALLOW_ACTION
},
"system-update": {
app: DENY_ACTION,
privileged: DENY_ACTION,

Просмотреть файл

@ -371,7 +371,6 @@ GK_ATOM(excludeResultPrefixes, "exclude-result-prefixes")
GK_ATOM(excludes, "excludes")
GK_ATOM(expr, "expr")
GK_ATOM(expectingSystemMessage, "expecting-system-message")
GK_ATOM(extapp, "extapp")
GK_ATOM(extends, "extends")
GK_ATOM(extensionElementPrefixes, "extension-element-prefixes")
GK_ATOM(face, "face")

Просмотреть файл

@ -1,185 +0,0 @@
/* -*- 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/. */
#include "mozilla/dom/HTMLExtAppElement.h"
#include "mozilla/dom/HTMLUnknownElement.h"
#include "mozilla/dom/HTMLExtAppElementBinding.h"
#include "mozilla/dom/ExternalAppEvent.h"
#include "nsGkAtoms.h"
#include "nsIAtom.h"
#include "nsIPermissionManager.h"
#include "nsStyleConsts.h"
#include "nsRuleData.h"
nsGenericHTMLElement*
NS_NewHTMLExtAppElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
mozilla::dom::FromParser aFromParser) {
// Return HTMLUnknownElement if the document doesn't have the 'external-app' permission.
nsCOMPtr<nsIPermissionManager> permissionManager =
mozilla::services::GetPermissionManager();
RefPtr<mozilla::dom::NodeInfo> ni = aNodeInfo;
nsIPrincipal* principal = ni->GetDocument()->NodePrincipal();
already_AddRefed<mozilla::dom::NodeInfo> aarni = ni.forget();
if (!permissionManager) {
return new mozilla::dom::HTMLUnknownElement(aarni);
}
uint32_t perm = nsIPermissionManager::UNKNOWN_ACTION;
permissionManager->TestExactPermissionFromPrincipal(principal,
"external-app",
&perm);
if (perm != nsIPermissionManager::ALLOW_ACTION) {
return new mozilla::dom::HTMLUnknownElement(aarni);
}
return new mozilla::dom::HTMLExtAppElement(aarni);
}
namespace mozilla {
namespace dom {
HTMLExtAppElement::HTMLExtAppElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
mCustomEventDispatch = new nsCustomEventDispatch(this);
mCustomPropertyBag = new nsCustomPropertyBag();
nsCOMPtr<nsIExternalApplication> app =
do_CreateInstance(NS_EXTERNALAPP_CONTRACTID);
if (app) {
nsresult rv = app->Init(OwnerDoc()->GetInnerWindow(), mCustomPropertyBag, mCustomEventDispatch);
if (NS_SUCCEEDED(rv)) {
mApp = app;
}
}
}
HTMLExtAppElement::~HTMLExtAppElement()
{
mCustomEventDispatch->ClearEventTarget();
}
void
HTMLExtAppElement::GetCustomProperty(const nsAString& aName, nsString& aReturn)
{
mCustomPropertyBag->GetCustomProperty(aName, aReturn);
}
void
HTMLExtAppElement::PostMessage(const nsAString& aMessage, ErrorResult& aRv)
{
if (!mApp) {
aRv.Throw(NS_ERROR_UNEXPECTED);
return;
}
aRv = mApp->PostMessage(aMessage);
}
NS_IMPL_ADDREF_INHERITED(HTMLExtAppElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLExtAppElement, Element)
NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLExtAppElement)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLExtAppElement,
nsGenericHTMLElement)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLExtAppElement,
nsGenericHTMLElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
// QueryInterface implementation for HTMLExtAppElement
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLExtAppElement)
NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
NS_IMPL_ELEMENT_CLONE(HTMLExtAppElement)
JSObject*
HTMLExtAppElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
{
return HTMLExtAppElementBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
NS_IMPL_ISUPPORTS(nsCustomPropertyBag, nsICustomPropertyBag)
nsCustomPropertyBag::nsCustomPropertyBag()
{
}
nsCustomPropertyBag::~nsCustomPropertyBag()
{
}
NS_IMETHODIMP
nsCustomPropertyBag::SetProperty(const nsAString& aName, const nsAString& aValue)
{
mBag.Put(nsString(aName), new nsString(aValue));
return NS_OK;
}
NS_IMETHODIMP
nsCustomPropertyBag::RemoveProperty(const nsAString& aName)
{
mBag.Remove(nsString(aName));
return NS_OK;
}
void
nsCustomPropertyBag::GetCustomProperty(const nsAString& aName, nsString& aReturn)
{
nsString* value;
if (!mBag.Get(nsString(aName), &value)) {
aReturn.Truncate();
return;
}
MOZ_ASSERT(value);
aReturn.Assign(*value);
}
NS_IMPL_ISUPPORTS(nsCustomEventDispatch, nsICustomEventDispatch)
nsCustomEventDispatch::nsCustomEventDispatch(mozilla::dom::EventTarget* aEventTarget)
: mEventTarget(aEventTarget)
{
MOZ_ASSERT(mEventTarget);
}
void
nsCustomEventDispatch::ClearEventTarget()
{
mEventTarget = nullptr;
}
nsCustomEventDispatch::~nsCustomEventDispatch()
{
}
NS_IMETHODIMP
nsCustomEventDispatch::DispatchExternalEvent(const nsAString& value)
{
if (!mEventTarget) {
return NS_OK;
}
mozilla::dom::ExternalAppEventInit init;
init.mData = value;
RefPtr<mozilla::dom::ExternalAppEvent> event =
mozilla::dom::ExternalAppEvent::Constructor(mEventTarget,
NS_LITERAL_STRING("externalappevent"),
init);
bool defaultActionEnabled;
return mEventTarget->DispatchEvent(event, &defaultActionEnabled);
}

Просмотреть файл

@ -1,79 +0,0 @@
/* -*- 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/. */
#ifndef mozilla_dom_HTMLExtAppElement_h
#define mozilla_dom_HTMLExtAppElement_h
#include "nsGenericHTMLElement.h"
#include "nsIExternalApplication.h"
class nsCustomEventDispatch;
class nsCustomPropertyBag;
namespace mozilla {
namespace dom {
class HTMLExtAppElement final : public nsGenericHTMLElement
{
public:
explicit HTMLExtAppElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLExtAppElement,
nsGenericHTMLElement)
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
void GetCustomProperty(const nsAString& aName, nsString& aReturn);
void PostMessage(const nsAString& aMessage, ErrorResult& aRv);
protected:
virtual ~HTMLExtAppElement();
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
RefPtr<nsCustomEventDispatch> mCustomEventDispatch;
RefPtr<nsCustomPropertyBag> mCustomPropertyBag;
nsCOMPtr<nsIExternalApplication> mApp;
};
} // namespace dom
} // namespace mozilla
class nsCustomEventDispatch final : public nsICustomEventDispatch
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICUSTOMEVENTDISPATCH
explicit nsCustomEventDispatch(mozilla::dom::EventTarget* aEventTarget);
void ClearEventTarget();
private:
~nsCustomEventDispatch();
// Weak pointer, this object is owned by the event target.
mozilla::dom::EventTarget* mEventTarget;
};
class nsCustomPropertyBag final : public nsICustomPropertyBag
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICUSTOMPROPERTYBAG
nsCustomPropertyBag();
void GetCustomProperty(const nsAString& aName, nsString& aReturn);
private:
~nsCustomPropertyBag();
nsClassHashtable<nsStringHashKey, nsString> mBag;
};
#endif // mozilla_dom_HTMLExtAppElement_h

Просмотреть файл

@ -225,7 +225,7 @@ public:
// Called by the media decoder and the video frame to get the
// ImageContainer containing the video data.
B2G_ACL_EXPORT virtual VideoFrameContainer* GetVideoFrameContainer() final override;
virtual VideoFrameContainer* GetVideoFrameContainer() final override;
layers::ImageContainer* GetImageContainer();
// From PrincipalChangeObserver<DOMMediaStream>.

Просмотреть файл

@ -8,6 +8,7 @@
#include "mozilla/dom/HTMLDetailsElement.h"
#include "mozilla/dom/HTMLElementBinding.h"
#include "mozilla/dom/HTMLUnknownElement.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/Preferences.h"
#include "mozilla/TextEvents.h"

Просмотреть файл

@ -58,7 +58,6 @@ EXPORTS.mozilla.dom += [
'HTMLDataListElement.h',
'HTMLDetailsElement.h',
'HTMLDivElement.h',
'HTMLExtAppElement.h',
'HTMLFieldSetElement.h',
'HTMLFontElement.h',
'HTMLFormControlsCollection.h',
@ -138,7 +137,6 @@ UNIFIED_SOURCES += [
'HTMLDetailsElement.cpp',
'HTMLDivElement.cpp',
'HTMLElement.cpp',
'HTMLExtAppElement.cpp',
'HTMLFieldSetElement.cpp',
'HTMLFontElement.cpp',
'HTMLFormControlsCollection.cpp',

Просмотреть файл

@ -40,7 +40,9 @@
#include "mozilla/dom/File.h"
using namespace mozilla;
using mozilla::dom::Blob;
using mozilla::dom::EncodingUtils;
using mozilla::dom::File;
static void
SendJSWarning(nsIDocument* aDocument,

Просмотреть файл

@ -1772,7 +1772,6 @@ NS_DECLARE_NS_NEW_HTML_ELEMENT(Data)
NS_DECLARE_NS_NEW_HTML_ELEMENT(DataList)
NS_DECLARE_NS_NEW_HTML_ELEMENT(Details)
NS_DECLARE_NS_NEW_HTML_ELEMENT(Div)
NS_DECLARE_NS_NEW_HTML_ELEMENT(ExtApp)
NS_DECLARE_NS_NEW_HTML_ELEMENT(FieldSet)
NS_DECLARE_NS_NEW_HTML_ELEMENT(Font)
NS_DECLARE_NS_NEW_HTML_ELEMENT(Form)

Просмотреть файл

@ -599,7 +599,6 @@ support-files = file_bug871161-1.html file_bug871161-2.html
skip-if = buildapp == 'b2g' || (e10s && debug && os == 'win') # bug 1129014
[test_img_complete.html]
[test_viewport_resize.html]
[test_extapp.html]
[test_image_clone_load.html]
[test_bug1203668.html]
[test_bug1166138.html]

Просмотреть файл

@ -1,11 +0,0 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Test for extapp element being HTMLUnknownElement when permission is not available</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
assert_true(document.createElement("extapp") instanceof HTMLUnknownElement);
}, "extapp should be HTMLUnknownElement when external-app permission is not enabled.");
</script>

Просмотреть файл

@ -31,7 +31,7 @@ class HTMLMediaElement;
* confusing.
*/
class VideoFrameContainer {
B2G_ACL_EXPORT ~VideoFrameContainer();
~VideoFrameContainer();
public:
typedef layers::ImageContainer ImageContainer;
@ -50,7 +50,7 @@ public:
// aFrameID is ignored if aPrincipalHandle already is our pending principalHandle.
void UpdatePrincipalHandleForFrameID(const PrincipalHandle& aPrincipalHandle,
const ImageContainer::FrameID& aFrameID);
B2G_ACL_EXPORT void SetCurrentFrame(const gfx::IntSize& aIntrinsicSize, Image* aImage,
void SetCurrentFrame(const gfx::IntSize& aIntrinsicSize, Image* aImage,
const TimeStamp& aTargetTime);
void SetCurrentFrames(const gfx::IntSize& aIntrinsicSize,
const nsTArray<ImageContainer::NonOwningImage>& aImages);
@ -82,8 +82,8 @@ public:
INVALIDATE_FORCE
};
void Invalidate() { InvalidateWithFlags(INVALIDATE_DEFAULT); }
B2G_ACL_EXPORT void InvalidateWithFlags(uint32_t aFlags);
B2G_ACL_EXPORT ImageContainer* GetImageContainer();
void InvalidateWithFlags(uint32_t aFlags);
ImageContainer* GetImageContainer();
void ForgetElement() { mElement = nullptr; }
uint32_t GetDroppedImageCount() { return mImageContainer->GetDroppedImageCount(); }

Просмотреть файл

@ -479,8 +479,6 @@ var interfaceNamesInGlobalScope =
"EventTarget",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "External", b2g: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "ExternalAppEvent", b2g: true, permission: ["external-app"]},
// IMPORTANT: Do not change this list without review from a DOM peer!
"File",
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -563,8 +561,6 @@ var interfaceNamesInGlobalScope =
"HTMLElement",
// IMPORTANT: Do not change this list without review from a DOM peer!
"HTMLEmbedElement",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "HTMLExternalAppElement", b2g: true, permission: ["external-app"]},
// IMPORTANT: Do not change this list without review from a DOM peer!
"HTMLFieldSetElement",
// IMPORTANT: Do not change this list without review from a DOM peer!

Просмотреть файл

@ -1,17 +0,0 @@
/* -*- Mode: IDL; 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/.
*/
[Constructor(DOMString type, optional ExternalAppEventInit eventInitDict),
CheckAnyPermissions="external-app"]
interface ExternalAppEvent : Event
{
readonly attribute DOMString data;
};
dictionary ExternalAppEventInit : EventInit
{
DOMString data = "";
};

Просмотреть файл

@ -1,16 +0,0 @@
/* -*- Mode: IDL; 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/.
*/
[CheckAnyPermissions="external-app"]
interface HTMLExtAppElement : HTMLElement {
// Gets the value of the property from a property bag
// that was provided to the external application.
DOMString getCustomProperty(DOMString name);
// Posts a message to the external application.
[Throws]
void postMessage(DOMString name);
};

Просмотреть файл

@ -196,7 +196,6 @@ WEBIDL_FILES = [
'HTMLDocument.webidl',
'HTMLElement.webidl',
'HTMLEmbedElement.webidl',
'HTMLExtAppElement.webidl',
'HTMLFieldSetElement.webidl',
'HTMLFontElement.webidl',
'HTMLFormControlsCollection.webidl',
@ -790,7 +789,6 @@ GENERATED_EVENTS_WEBIDL_FILES = [
'DOMTransactionEvent.webidl',
'DownloadEvent.webidl',
'ErrorEvent.webidl',
'ExternalAppEvent.webidl',
'FontFaceSetLoadEvent.webidl',
'HashChangeEvent.webidl',
'IccChangeEvent.webidl',

Просмотреть файл

@ -665,7 +665,6 @@ static const nsElementInfo kElements[eHTMLTag_userdefined] = {
ELEM(dt, true, true, GROUP_DL_CONTENT, GROUP_INLINE_ELEMENT),
ELEM(em, true, true, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
ELEM(embed, false, false, GROUP_NONE, GROUP_NONE),
ELEM(extapp, true, true, GROUP_NONE, GROUP_NONE),
ELEM(fieldset, true, true, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
ELEM(figcaption, true, false, GROUP_FIGCAPTION, GROUP_FLOW_ELEMENT),
ELEM(figure, true, true, GROUP_BLOCK,

Просмотреть файл

@ -564,7 +564,7 @@ private:
typedef mozilla::ReentrantMonitor ReentrantMonitor;
// Private destructor, to discourage deletion outside of Release():
B2G_ACL_EXPORT ~ImageContainer();
~ImageContainer();
void SetCurrentImageInternal(const nsTArray<NonOwningImage>& aImages);

Просмотреть файл

@ -603,7 +603,7 @@ private:
* Here goes the shut-down code that uses virtual methods.
* Must only be called by Release().
*/
B2G_ACL_EXPORT void Finalize() {}
void Finalize() {}
friend class AtomicRefCountedWithFinalize<TextureClient>;
friend class gl::SharedSurface_Gralloc;

Просмотреть файл

@ -111,7 +111,7 @@ public:
// NOTE: These methods may be called on any thread. The Task will be invoked
// on the thread that executes MessageLoop::Run().
B2G_ACL_EXPORT void PostTask(
void PostTask(
const tracked_objects::Location& from_here, Task* task);
void PostDelayedTask(

Просмотреть файл

@ -63,7 +63,7 @@ void DispatchTupleToFunction(Function function, mozilla::Tuple<Args...>& arg)
class Task : public tracked_objects::Tracked {
public:
Task() {}
virtual B2G_ACL_EXPORT ~Task() {}
virtual ~Task() {}
// Tasks are automatically deleted after Run is called.
virtual void Run() = 0;

Просмотреть файл

@ -94,8 +94,8 @@ class Births;
class Tracked {
public:
B2G_ACL_EXPORT Tracked();
B2G_ACL_EXPORT virtual ~Tracked();
Tracked();
virtual ~Tracked();
// Used to record the FROM_HERE location of a caller.
void SetBirthPlace(const Location& from_here);

Просмотреть файл

@ -175,10 +175,6 @@ const nsHTMLElement gHTMLElements[] = {
/*tag*/ eHTMLTag_embed,
/*parent,leaf*/ kSpecial, true
},
{
/*tag*/ eHTMLTag_extapp,
/*parent,leaf*/ kNone, false
},
{
/*tag*/ eHTMLTag_fieldset,
/*parent,leaf*/ kBlock, false

Просмотреть файл

@ -74,7 +74,6 @@ HTML_TAG(dl, SharedList)
HTML_HTMLELEMENT_TAG(dt)
HTML_HTMLELEMENT_TAG(em)
HTML_TAG(embed, SharedObject)
HTML_TAG(extapp, ExtApp)
HTML_TAG(fieldset, FieldSet)
HTML_HTMLELEMENT_TAG(figcaption)
HTML_HTMLELEMENT_TAG(figure)

Просмотреть файл

@ -69,7 +69,7 @@ public:
// getBufferQueue returns the GonkBufferQueue object to which this
// GonkConsumerBase is connected.
B2G_ACL_EXPORT sp<GonkBufferQueue> getBufferQueue() const;
sp<GonkBufferQueue> getBufferQueue() const;
// dump writes the current state to a string. Child classes should add
// their state to the dump by overriding the dumpLocked method, which is

Просмотреть файл

@ -67,7 +67,7 @@ class GonkNativeWindow: public GonkConsumerBase
// access at the same time.
// controlledByApp tells whether this consumer is controlled by the
// application.
B2G_ACL_EXPORT GonkNativeWindow(int bufferCount = GonkBufferQueue::MIN_UNDEQUEUED_BUFFERS);
GonkNativeWindow(int bufferCount = GonkBufferQueue::MIN_UNDEQUEUED_BUFFERS);
GonkNativeWindow(const sp<GonkBufferQueue>& bq, uint32_t consumerUsage,
int bufferCount = GonkBufferQueue::MIN_UNDEQUEUED_BUFFERS,
bool controlledByApp = false);
@ -112,7 +112,7 @@ class GonkNativeWindow: public GonkConsumerBase
status_t setDefaultBufferFormat(uint32_t defaultFormat);
// Get next frame from the queue, caller owns the returned buffer.
B2G_ACL_EXPORT already_AddRefed<TextureClient> getCurrentBuffer();
already_AddRefed<TextureClient> getCurrentBuffer();
// Return the buffer to the queue and mark it as FREE. After that
// the buffer is useable again for the decoder.
@ -120,7 +120,7 @@ class GonkNativeWindow: public GonkConsumerBase
already_AddRefed<TextureClient> getTextureClientFromBuffer(ANativeWindowBuffer* buffer);
B2G_ACL_EXPORT void setNewFrameCallback(GonkNativeWindowNewFrameCallback* callback);
void setNewFrameCallback(GonkNativeWindowNewFrameCallback* callback);
static void RecycleCallback(TextureClient* client, void* closure);

Просмотреть файл

@ -121,12 +121,6 @@
#endif
#ifdef MOZ_WIDGET_GONK
#define B2G_ACL_EXPORT NS_EXPORT
#else
#define B2G_ACL_EXPORT
#endif
/**
* Macro for creating typedefs for pointer-to-member types which are
* declared with stdcall. It is important to use this for any type which is

Просмотреть файл

@ -112,7 +112,7 @@ char* ToNewCString(const nsACString& aSource);
* @return a new |char| buffer you must free with |free|.
*/
B2G_ACL_EXPORT char* ToNewUTF8String(const nsAString& aSource, uint32_t* aUTF8Count = nullptr);
char* ToNewUTF8String(const nsAString& aSource, uint32_t* aUTF8Count = nullptr);
/**

Просмотреть файл

@ -315,13 +315,13 @@ public:
* for wide strings. Call this version when you know the
* length of 'data'.
*/
bool NS_FASTCALL B2G_ACL_EXPORT EqualsASCII(const char* aData, size_type aLen) const;
bool NS_FASTCALL EqualsASCII(const char* aData, size_type aLen) const;
/**
* An efficient comparison with ASCII that can be used even
* for wide strings. Call this version when 'data' is
* null-terminated.
*/
bool NS_FASTCALL B2G_ACL_EXPORT EqualsASCII(const char* aData) const;
bool NS_FASTCALL EqualsASCII(const char* aData) const;
// EqualsLiteral must ONLY be applied to an actual literal string, or
// a char array *constant* declared without an explicit size.
@ -948,7 +948,7 @@ protected:
* any of its member variables. in other words, this function acts
* like a destructor.
*/
void NS_FASTCALL B2G_ACL_EXPORT Finalize();
void NS_FASTCALL Finalize();
/**
* this function prepares mData to be mutated.

Просмотреть файл

@ -7,7 +7,6 @@
XPIDL_SOURCES += [
'nsIBlocklistService.idl',
'nsIDeviceSensors.idl',
'nsIExternalApplication.idl',
'nsIGConfService.idl',
'nsIGeolocationProvider.idl',
'nsIGIOService.idl',

Просмотреть файл

@ -1,31 +0,0 @@
/* 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/. */
#include "nsISupports.idl"
interface nsPIDOMWindowInner;
[builtinclass, uuid(adf6b501-609a-4f54-ac16-39b54d6358b5)]
interface nsICustomEventDispatch : nsISupports {
// Dispatches an event named "externalappevent" with the data
// in a property named "data" on the event.
void dispatchExternalEvent(in AString data);
};
[builtinclass, uuid(4d797f32-a24d-4cbc-b608-1eb0fc8e442b)]
interface nsICustomPropertyBag : nsISupports {
void setProperty(in AString name, in AString value);
void removeProperty(in AString name);
};
[builtinclass, uuid(ce42a847-3926-473e-95e0-ed4a88977232)]
interface nsIExternalApplication : nsISupports {
void init(in nsPIDOMWindowInner window, in nsICustomPropertyBag bag, in nsICustomEventDispatch callback);
void postMessage(in AString message);
};
%{C++
#define NS_EXTERNALAPP_CONTRACTID "@mozilla.org/externalapp;1"
#define NS_EXTERNALAPP_CID {0x8ec5dce2, 0x67e1, 0x49cd, {0xa0, 0x12, 0xf9, 0xfe, 0x32, 0x00, 0xd0, 0x8e}}
%}