Bug 1633379 - Part 1: Move PInProcess into dom/ipc, r=kmag,Yoric

This moves it near the cross-process `PContent` actor, and makes it more clear
that this actor is only intended to be used for DOM things.

Differential Revision: https://phabricator.services.mozilla.com/D80581
This commit is contained in:
Nika Layzell 2020-06-25 17:50:51 +00:00
Родитель f47ca94618
Коммит 9c12bdf9af
12 изменённых файлов: 31 добавлений и 34 удалений

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

@ -50,6 +50,7 @@
#include "mozilla/dom/DocGroup.h"
#include "mozilla/dom/ExternalHelperAppChild.h"
#include "mozilla/dom/GetFilesHelper.h"
#include "mozilla/dom/InProcessChild.h"
#include "mozilla/dom/IPCBlobInputStreamChild.h"
#include "mozilla/dom/IPCBlobUtils.h"
#include "mozilla/dom/JSActorService.h"
@ -78,7 +79,6 @@
#include "mozilla/ipc/FileDescriptorSetChild.h"
#include "mozilla/ipc/FileDescriptorUtils.h"
#include "mozilla/ipc/GeckoChildProcessHost.h"
#include "mozilla/ipc/InProcessChild.h"
#include "mozilla/ipc/LibrarySandboxPreload.h"
#include "mozilla/ipc/ProcessChild.h"
#include "mozilla/ipc/PChildToParentStreamChild.h"

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

@ -4,20 +4,16 @@
* 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_ipc_InProcessChild_h
#define mozilla_ipc_InProcessChild_h
#ifndef mozilla_dom_InProcessChild_h
#define mozilla_dom_InProcessChild_h
#include "mozilla/ipc/PInProcessChild.h"
#include "mozilla/dom/PInProcessChild.h"
#include "mozilla/StaticPtr.h"
namespace mozilla {
namespace dom {
class PWindowGlobalParent;
class PWindowGlobalChild;
} // namespace dom
namespace ipc {
class InProcessParent;
/**
@ -52,7 +48,7 @@ class InProcessChild final : public PInProcessChild {
static StaticRefPtr<InProcessChild> sSingleton;
};
} // namespace ipc
} // namespace dom
} // namespace mozilla
#endif // defined(mozilla_ipc_InProcessChild_h)
#endif // defined(mozilla_dom_InProcessChild_h)

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

@ -4,16 +4,18 @@
* 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/ipc/InProcessParent.h"
#include "mozilla/ipc/InProcessChild.h"
#include "mozilla/dom/InProcessParent.h"
#include "mozilla/dom/InProcessChild.h"
#include "nsIObserverService.h"
#include "mozilla/Services.h"
using namespace mozilla::ipc;
// This file contains the implementation of core InProcess lifecycle management
// facilities.
namespace mozilla {
namespace ipc {
namespace dom {
StaticRefPtr<InProcessParent> InProcessParent::sSingleton;
StaticRefPtr<InProcessChild> InProcessChild::sSingleton;
@ -179,5 +181,5 @@ IProtocol* InProcessChild::ParentActorFor(IProtocol* aActor) {
NS_IMPL_ISUPPORTS(InProcessParent, nsIObserver)
} // namespace ipc
} // namespace dom
} // namespace mozilla

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

@ -4,20 +4,16 @@
* 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_ipc_InProcessParent_h
#define mozilla_ipc_InProcessParent_h
#ifndef mozilla_dom_InProcessParent_h
#define mozilla_dom_InProcessParent_h
#include "mozilla/ipc/PInProcessParent.h"
#include "mozilla/dom/PInProcessParent.h"
#include "mozilla/StaticPtr.h"
namespace mozilla {
namespace dom {
class PWindowGlobalParent;
class PWindowGlobalChild;
} // namespace dom
namespace ipc {
class InProcessChild;
/**
@ -56,7 +52,7 @@ class InProcessParent final : public nsIObserver, public PInProcessParent {
static bool sShutdown;
};
} // namespace ipc
} // namespace dom
} // namespace mozilla
#endif // defined(mozilla_ipc_InProcessParent_h)
#endif // defined(mozilla_dom_InProcessParent_h)

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

@ -6,7 +6,7 @@
#include "mozilla/dom/JSProcessActorBinding.h"
#include "mozilla/dom/JSProcessActorChild.h"
#include "mozilla/ipc/InProcessChild.h"
#include "mozilla/dom/InProcessChild.h"
namespace mozilla {
namespace dom {

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

@ -9,14 +9,14 @@ include protocol PWindowGlobal;
include DOMTypes;
namespace mozilla {
namespace ipc {
namespace dom {
/**
* PInProcess is intended for use as an alternative actor manager to PContent
* for async actors which want to be used uniformly in both Content->Chrome and
* Chrome->Chrome circumstances.
*
* `mozilla::ipc::InProcess{Parent, Child}::Singleton()` should be used to get
* `mozilla::dom::InProcess{Parent, Child}::Singleton()` should be used to get
* an instance of this actor.
*/
async refcounted protocol PInProcess
@ -24,5 +24,5 @@ async refcounted protocol PInProcess
manages PWindowGlobal;
};
} // namespace ipc
} // namespace dom
} // namespace mozilla

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

@ -16,6 +16,7 @@
#include "nsVariant.h"
using namespace IPC;
using namespace mozilla::dom;
namespace mozilla {
namespace ipc {

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

@ -20,8 +20,8 @@
#include "mozilla/dom/WindowGlobalActorsBinding.h"
#include "mozilla/dom/WindowGlobalParent.h"
#include "mozilla/dom/WindowContext.h"
#include "mozilla/ipc/InProcessChild.h"
#include "mozilla/ipc/InProcessParent.h"
#include "mozilla/dom/InProcessChild.h"
#include "mozilla/dom/InProcessParent.h"
#include "nsContentUtils.h"
#include "nsDocShell.h"
#include "nsFocusManager.h"

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

@ -10,7 +10,7 @@
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/ipc/InProcessParent.h"
#include "mozilla/dom/InProcessParent.h"
#include "mozilla/dom/BrowserBridgeParent.h"
#include "mozilla/dom/CanonicalBrowsingContext.h"
#include "mozilla/dom/ClientInfo.h"

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

@ -48,6 +48,8 @@ EXPORTS.mozilla.dom += [
'DocShellMessageUtils.h',
'EffectsInfo.h',
'FilePickerParent.h',
'InProcessChild.h',
'InProcessParent.h',
'JSActor.h',
'JSActorService.h',
'JSProcessActorChild.h',
@ -105,6 +107,7 @@ UNIFIED_SOURCES += [
'CSPMessageUtils.cpp',
'DocShellMessageUtils.cpp',
'FilePickerParent.cpp',
'InProcessImpl.cpp',
'JSActor.cpp',
'JSActorService.cpp',
'JSProcessActorChild.cpp',
@ -158,6 +161,7 @@ IPDL_SOURCES += [
'PContentPermissionRequest.ipdl',
'PCycleCollectWithLogs.ipdl',
'PFilePicker.ipdl',
'PInProcess.ipdl',
'PLoginReputation.ipdl',
'PPluginWidget.ipdl',
'PProcessHangMonitor.ipdl',

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

@ -10,6 +10,8 @@
#include "chrome/common/ipc_message_utils.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/Variant.h"
#include "mozilla/Tuple.h"
#include "nsTArray.h"
#include <type_traits>

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

@ -29,8 +29,6 @@ EXPORTS.mozilla.ipc += [
'GeckoChildProcessHost.h',
'IdleSchedulerChild.h',
'IdleSchedulerParent.h',
'InProcessChild.h',
'InProcessParent.h',
'InputStreamUtils.h',
'IOThreadChild.h',
'IPCStreamAlloc.h',
@ -155,7 +153,6 @@ UNIFIED_SOURCES += [
'FileDescriptorUtils.cpp',
'IdleSchedulerChild.cpp',
'IdleSchedulerParent.cpp',
'InProcessImpl.cpp',
'InputStreamUtils.cpp',
'IPCMessageUtils.cpp',
'IPCStreamChild.cpp',
@ -216,7 +213,6 @@ IPDL_SOURCES = [
'PChildToParentStream.ipdl',
'PFileDescriptorSet.ipdl',
'PIdleScheduler.ipdl',
'PInProcess.ipdl',
'PParentToChildStream.ipdl',
'ProtocolTypes.ipdlh',
'URIParams.ipdlh',