Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef PCOMContentPermissionRequestChild_h |
michael@0 | 6 | #define PCOMContentPermissionRequestChild_h |
michael@0 | 7 | |
michael@0 | 8 | #include "mozilla/dom/PContentPermissionRequestChild.h" |
michael@0 | 9 | // Microsoft's API Name hackery sucks |
michael@0 | 10 | // XXXbz Doing this in a header is a gigantic footgun. See |
michael@0 | 11 | // https://bugzilla.mozilla.org/show_bug.cgi?id=932421#c3 for why. |
michael@0 | 12 | #undef CreateEvent |
michael@0 | 13 | |
michael@0 | 14 | /* |
michael@0 | 15 | PContentPermissionRequestChild implementations also are |
michael@0 | 16 | XPCOM objects. Addref() is called on their implementation |
michael@0 | 17 | before SendPContentPermissionRequestConstructor is called. |
michael@0 | 18 | When Dealloc is called, IPDLRelease() is called. |
michael@0 | 19 | Implementations of this method are expected to call |
michael@0 | 20 | Release() on themselves. See Bug 594261 for more |
michael@0 | 21 | information. |
michael@0 | 22 | */ |
michael@0 | 23 | class PCOMContentPermissionRequestChild : public mozilla::dom::PContentPermissionRequestChild { |
michael@0 | 24 | public: |
michael@0 | 25 | virtual void IPDLRelease() = 0; |
michael@0 | 26 | #ifdef DEBUG |
michael@0 | 27 | PCOMContentPermissionRequestChild() : mIPCOpen(false) {} |
michael@0 | 28 | virtual ~PCOMContentPermissionRequestChild() { |
michael@0 | 29 | // mIPCOpen is set to true in TabChild::SendPContentPermissionRequestConstructor |
michael@0 | 30 | // and set to false in TabChild::DeallocPContentPermissionRequest |
michael@0 | 31 | MOZ_ASSERT(!mIPCOpen, "Protocol must not be open when PCOMContentPermissionRequestChild is destroyed."); |
michael@0 | 32 | } |
michael@0 | 33 | bool mIPCOpen; |
michael@0 | 34 | #endif /* DEBUG */ |
michael@0 | 35 | }; |
michael@0 | 36 | |
michael@0 | 37 | #endif |