diff --git a/dom/file/MutableBlobStorage.cpp b/dom/file/MutableBlobStorage.cpp index 86c971f01144..7e0fd9ce60bd 100644 --- a/dom/file/MutableBlobStorage.cpp +++ b/dom/file/MutableBlobStorage.cpp @@ -8,7 +8,7 @@ #include "MutableBlobStorage.h" #include "MemoryBlobImpl.h" #include "mozilla/CheckedInt.h" -#include "mozilla/dom/ipc/TemporaryIPCBlobChild.h" +#include "mozilla/dom/TemporaryIPCBlobChild.h" #include "mozilla/dom/WorkerPrivate.h" #include "mozilla/ipc/BackgroundChild.h" #include "mozilla/ipc/PBackgroundChild.h" diff --git a/dom/file/ipc/PTemporaryIPCBlob.ipdl b/dom/file/ipc/PTemporaryIPCBlob.ipdl index 0178ffc3e8c0..82dd285bce26 100644 --- a/dom/file/ipc/PTemporaryIPCBlob.ipdl +++ b/dom/file/ipc/PTemporaryIPCBlob.ipdl @@ -11,7 +11,7 @@ include protocol PParentToChildStream; include IPCBlob; namespace mozilla { -namespace ipc { +namespace dom { union IPCBlobOrError { @@ -39,5 +39,5 @@ parent: async OperationDone(nsCString aContentType, FileDescriptor aFD); }; -} // namespace ipc +} // namespace dom } // namespace mozilla diff --git a/dom/file/ipc/TemporaryIPCBlobChild.h b/dom/file/ipc/TemporaryIPCBlobChild.h index 078d20d545e2..0ec60d55866a 100644 --- a/dom/file/ipc/TemporaryIPCBlobChild.h +++ b/dom/file/ipc/TemporaryIPCBlobChild.h @@ -4,11 +4,11 @@ * 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_ipc_TemporaryIPCBlobChild_h -#define mozilla_dom_ipc_TemporaryIPCBlobChild_h +#ifndef mozilla_dom_TemporaryIPCBlobChild_h +#define mozilla_dom_TemporaryIPCBlobChild_h -#include "mozilla/ipc/PTemporaryIPCBlob.h" -#include "mozilla/ipc/PTemporaryIPCBlobChild.h" +#include "mozilla/dom/PTemporaryIPCBlob.h" +#include "mozilla/dom/PTemporaryIPCBlobChild.h" namespace mozilla { namespace dom { @@ -23,9 +23,8 @@ class TemporaryIPCBlobChildCallback { virtual void OperationFailed(nsresult aRv) = 0; }; -class TemporaryIPCBlobChild final - : public mozilla::ipc::PTemporaryIPCBlobChild { - friend class mozilla::ipc::PTemporaryIPCBlobChild; +class TemporaryIPCBlobChild final : public PTemporaryIPCBlobChild { + friend class PTemporaryIPCBlobChild; public: NS_INLINE_DECL_REFCOUNTING(TemporaryIPCBlobChild) @@ -53,4 +52,4 @@ class TemporaryIPCBlobChild final } // namespace dom } // namespace mozilla -#endif // mozilla_dom_ipc_TemporaryIPCBlobChild_h +#endif // mozilla_dom_TemporaryIPCBlobChild_h diff --git a/dom/file/ipc/TemporaryIPCBlobParent.h b/dom/file/ipc/TemporaryIPCBlobParent.h index 2a66804ebb07..10339bd4c96b 100644 --- a/dom/file/ipc/TemporaryIPCBlobParent.h +++ b/dom/file/ipc/TemporaryIPCBlobParent.h @@ -4,20 +4,19 @@ * 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_ipc_TemporaryIPCBlobParent_h -#define mozilla_dom_ipc_TemporaryIPCBlobParent_h +#ifndef mozilla_dom_TemporaryIPCBlobParent_h +#define mozilla_dom_TemporaryIPCBlobParent_h -#include "mozilla/ipc/PTemporaryIPCBlob.h" -#include "mozilla/ipc/PTemporaryIPCBlobParent.h" +#include "mozilla/dom/PTemporaryIPCBlob.h" +#include "mozilla/dom/PTemporaryIPCBlobParent.h" class nsIFile; namespace mozilla { namespace dom { -class TemporaryIPCBlobParent final - : public mozilla::ipc::PTemporaryIPCBlobParent { - friend class mozilla::ipc::PTemporaryIPCBlobParent; +class TemporaryIPCBlobParent final : public PTemporaryIPCBlobParent { + friend class PTemporaryIPCBlobParent; public: explicit TemporaryIPCBlobParent(); @@ -43,4 +42,4 @@ class TemporaryIPCBlobParent final } // namespace dom } // namespace mozilla -#endif // mozilla_dom_ipc_TemporaryIPCBlobParent_h +#endif // mozilla_dom_TemporaryIPCBlobParent_h diff --git a/dom/file/ipc/moz.build b/dom/file/ipc/moz.build index c5dcd757838a..35f1daa801f3 100644 --- a/dom/file/ipc/moz.build +++ b/dom/file/ipc/moz.build @@ -19,6 +19,8 @@ EXPORTS.mozilla.dom += [ 'IPCBlobUtils.h', 'PendingIPCBlobChild.h', 'PendingIPCBlobParent.h', + 'TemporaryIPCBlobChild.h', + 'TemporaryIPCBlobParent.h', ] EXPORTS.mozilla.dom.ipc += [ @@ -26,8 +28,6 @@ EXPORTS.mozilla.dom.ipc += [ 'IPCBlobInputStreamChild.h', 'IPCBlobInputStreamParent.h', 'IPCBlobInputStreamStorage.h', - 'TemporaryIPCBlobChild.h', - 'TemporaryIPCBlobParent.h', ] UNIFIED_SOURCES += [ diff --git a/ipc/glue/BackgroundChildImpl.cpp b/ipc/glue/BackgroundChildImpl.cpp index 90d5d1f0af11..4b72e44cbd5e 100644 --- a/ipc/glue/BackgroundChildImpl.cpp +++ b/ipc/glue/BackgroundChildImpl.cpp @@ -26,11 +26,11 @@ #include "mozilla/dom/EndpointForReportChild.h" #include "mozilla/dom/FileSystemTaskBase.h" #include "mozilla/dom/PendingIPCBlobChild.h" +#include "mozilla/dom/TemporaryIPCBlobChild.h" #include "mozilla/dom/cache/ActorUtils.h" #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h" #include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h" #include "mozilla/dom/ipc/IPCBlobInputStreamChild.h" -#include "mozilla/dom/ipc/TemporaryIPCBlobChild.h" #include "mozilla/dom/IPCBlobUtils.h" #include "mozilla/dom/quota/PQuotaChild.h" #include "mozilla/dom/RemoteWorkerChild.h" @@ -369,15 +369,16 @@ bool BackgroundChildImpl::DeallocPSharedWorkerChild( return true; } -PTemporaryIPCBlobChild* BackgroundChildImpl::AllocPTemporaryIPCBlobChild() { +dom::PTemporaryIPCBlobChild* +BackgroundChildImpl::AllocPTemporaryIPCBlobChild() { MOZ_CRASH("This is not supposed to be called."); return nullptr; } bool BackgroundChildImpl::DeallocPTemporaryIPCBlobChild( - PTemporaryIPCBlobChild* aActor) { - RefPtr actor = - dont_AddRef(static_cast(aActor)); + dom::PTemporaryIPCBlobChild* aActor) { + RefPtr actor = + dont_AddRef(static_cast(aActor)); return true; } diff --git a/ipc/glue/BackgroundParentImpl.cpp b/ipc/glue/BackgroundParentImpl.cpp index bf2c51ed8507..cf6bd7f11792 100644 --- a/ipc/glue/BackgroundParentImpl.cpp +++ b/ipc/glue/BackgroundParentImpl.cpp @@ -30,10 +30,10 @@ #include "mozilla/dom/ServiceWorkerManagerParent.h" #include "mozilla/dom/ServiceWorkerRegistrar.h" #include "mozilla/dom/StorageActivityService.h" +#include "mozilla/dom/TemporaryIPCBlobParent.h" #include "mozilla/dom/cache/ActorUtils.h" #include "mozilla/dom/indexedDB/ActorsParent.h" #include "mozilla/dom/ipc/IPCBlobInputStreamParent.h" -#include "mozilla/dom/ipc/TemporaryIPCBlobParent.h" #include "mozilla/dom/IPCBlobUtils.h" #include "mozilla/dom/localstorage/ActorsParent.h" #include "mozilla/dom/quota/ActorsParent.h" @@ -586,19 +586,20 @@ bool BackgroundParentImpl::DeallocPFileCreatorParent( return true; } -PTemporaryIPCBlobParent* BackgroundParentImpl::AllocPTemporaryIPCBlobParent() { - return new mozilla::dom::TemporaryIPCBlobParent(); +dom::PTemporaryIPCBlobParent* +BackgroundParentImpl::AllocPTemporaryIPCBlobParent() { + return new dom::TemporaryIPCBlobParent(); } mozilla::ipc::IPCResult BackgroundParentImpl::RecvPTemporaryIPCBlobConstructor( - PTemporaryIPCBlobParent* aActor) { - mozilla::dom::TemporaryIPCBlobParent* actor = - static_cast(aActor); + dom::PTemporaryIPCBlobParent* aActor) { + dom::TemporaryIPCBlobParent* actor = + static_cast(aActor); return actor->CreateAndShareFile(); } bool BackgroundParentImpl::DeallocPTemporaryIPCBlobParent( - PTemporaryIPCBlobParent* aActor) { + dom::PTemporaryIPCBlobParent* aActor) { delete aActor; return true; } diff --git a/ipc/ipdl/ipdl/direct_call.py b/ipc/ipdl/ipdl/direct_call.py index d3ab82c76e64..36d49a17d5b6 100644 --- a/ipc/ipdl/ipdl/direct_call.py +++ b/ipc/ipdl/ipdl/direct_call.py @@ -93,13 +93,6 @@ DIRECT_CALL_OVERRIDES = { "mozilla::dom::TCPSocketParent", "mozilla/dom/network/TCPSocketParent.h" ), - ("PTemporaryIPCBlob", "child"): ( - "mozilla::dom::TemporaryIPCBlobChild", "mozilla/dom/ipc/TemporaryIPCBlobChild.h" - ), - ("PTemporaryIPCBlob", "parent"): ( - "mozilla::dom::TemporaryIPCBlobParent", "mozilla/dom/ipc/TemporaryIPCBlobParent.h" - ), - ("PTestShellCommand", "parent"): ("TestShellCommandParent", "mozilla/ipc/TestShellParent.h"), ("PTransportProvider", "child"): (