2012-05-21 04:12:37 -07: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/. */
|
2010-05-13 11:06:52 -07:00
|
|
|
|
2010-09-13 13:44:53 -07:00
|
|
|
#ifndef PCOMContentPermissionRequestChild_h
|
|
|
|
#define PCOMContentPermissionRequestChild_h
|
|
|
|
|
2010-09-09 22:00:08 -07:00
|
|
|
#include "mozilla/dom/PContentPermissionRequestChild.h"
|
|
|
|
// Microsoft's API Name hackery sucks
|
2013-10-31 19:07:10 -07:00
|
|
|
// XXXbz Doing this in a header is a gigantic footgun. See
|
|
|
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=932421#c3 for why.
|
2010-09-09 22:00:08 -07:00
|
|
|
#undef CreateEvent
|
|
|
|
|
|
|
|
/*
|
|
|
|
PContentPermissionRequestChild implementations also are
|
|
|
|
XPCOM objects. Addref() is called on their implementation
|
2012-07-18 12:09:28 -07:00
|
|
|
before SendPContentPermissionRequestConstructor is called.
|
2010-09-09 22:00:08 -07:00
|
|
|
When Dealloc is called, IPDLRelease() is called.
|
|
|
|
Implementations of this method are expected to call
|
|
|
|
Release() on themselves. See Bug 594261 for more
|
|
|
|
information.
|
|
|
|
*/
|
|
|
|
class PCOMContentPermissionRequestChild : public mozilla::dom::PContentPermissionRequestChild {
|
|
|
|
public:
|
|
|
|
virtual void IPDLRelease() = 0;
|
2012-07-18 12:09:28 -07:00
|
|
|
#ifdef DEBUG
|
|
|
|
PCOMContentPermissionRequestChild() : mIPCOpen(false) {}
|
|
|
|
virtual ~PCOMContentPermissionRequestChild() {
|
|
|
|
// mIPCOpen is set to true in TabChild::SendPContentPermissionRequestConstructor
|
|
|
|
// and set to false in TabChild::DeallocPContentPermissionRequest
|
|
|
|
MOZ_ASSERT(!mIPCOpen, "Protocol must not be open when PCOMContentPermissionRequestChild is destroyed.");
|
|
|
|
}
|
|
|
|
bool mIPCOpen;
|
|
|
|
#endif /* DEBUG */
|
2010-05-13 11:06:52 -07:00
|
|
|
};
|
2010-09-13 13:44:53 -07:00
|
|
|
|
|
|
|
#endif
|