Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - TemporaryIPCBlob actors, r=qdot

Differential Revision: https://phabricator.services.mozilla.com/D28190

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrea Marchesini 2019-04-26 18:01:53 +00:00
Родитель 69fd7c57d7
Коммит 7d30a9996e
8 изменённых файлов: 33 добавлений и 40 удалений

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

@ -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"

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

@ -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

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

@ -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

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

@ -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

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

@ -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 += [

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

@ -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<mozilla::dom::TemporaryIPCBlobChild> actor =
dont_AddRef(static_cast<mozilla::dom::TemporaryIPCBlobChild*>(aActor));
dom::PTemporaryIPCBlobChild* aActor) {
RefPtr<dom::TemporaryIPCBlobChild> actor =
dont_AddRef(static_cast<dom::TemporaryIPCBlobChild*>(aActor));
return true;
}

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

@ -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<mozilla::dom::TemporaryIPCBlobParent*>(aActor);
dom::PTemporaryIPCBlobParent* aActor) {
dom::TemporaryIPCBlobParent* actor =
static_cast<dom::TemporaryIPCBlobParent*>(aActor);
return actor->CreateAndShareFile();
}
bool BackgroundParentImpl::DeallocPTemporaryIPCBlobParent(
PTemporaryIPCBlobParent* aActor) {
dom::PTemporaryIPCBlobParent* aActor) {
delete aActor;
return true;
}

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

@ -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"): (