зеркало из https://github.com/mozilla/gecko-dev.git
Bug 836654 - Part 0: Add constants CONTENT_PROCESS_{UNKNOWN_ID,MAIN_ID} to HalTypes.h and remove the equivalent constants from ContentParent.h. r=cjones
This commit is contained in:
Родитель
da6965599b
Коммит
e714d6c4cf
|
@ -25,6 +25,7 @@
|
|||
#endif
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::hal;
|
||||
|
||||
StaticRefPtr<AudioChannelService> gAudioChannelService;
|
||||
|
||||
|
@ -93,7 +94,7 @@ AudioChannelService::RegisterAudioChannelAgent(AudioChannelAgent* aAgent,
|
|||
true /* mElementHidden */,
|
||||
true /* mMuted */);
|
||||
mAgents.Put(aAgent, data);
|
||||
RegisterType(aType, CONTENT_PARENT_NO_CHILD_ID);
|
||||
RegisterType(aType, CONTENT_PROCESS_ID_MAIN);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -117,7 +118,7 @@ AudioChannelService::UnregisterAudioChannelAgent(AudioChannelAgent* aAgent)
|
|||
mAgents.RemoveAndForget(aAgent, data);
|
||||
|
||||
if (data) {
|
||||
UnregisterType(data->mType, data->mElementHidden, CONTENT_PARENT_NO_CHILD_ID);
|
||||
UnregisterType(data->mType, data->mElementHidden, CONTENT_PROCESS_ID_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,7 +152,7 @@ AudioChannelService::GetMuted(AudioChannelAgent* aAgent, bool aElementHidden)
|
|||
// Update visibility.
|
||||
data->mElementHidden = aElementHidden;
|
||||
|
||||
bool muted = GetMutedInternal(data->mType, CONTENT_PARENT_NO_CHILD_ID,
|
||||
bool muted = GetMutedInternal(data->mType, CONTENT_PROCESS_ID_MAIN,
|
||||
aElementHidden, oldElementHidden);
|
||||
data->mMuted = muted;
|
||||
|
||||
|
|
|
@ -890,7 +890,7 @@ ContentParent::ContentParent(const nsAString& aAppManifestURL,
|
|||
ChildPrivileges aOSPrivileges)
|
||||
: mSubprocess(nullptr)
|
||||
, mOSPrivileges(aOSPrivileges)
|
||||
, mChildID(CONTENT_PARENT_UNKNOWN_CHILD_ID)
|
||||
, mChildID(CONTENT_PROCESS_ID_UNKNOWN)
|
||||
, mGeolocationWatchID(-1)
|
||||
, mRunToCompletionDepth(0)
|
||||
, mShouldCallUnblockChild(false)
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/dom/ipc/Blob.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/HalTypes.h"
|
||||
|
||||
#include "nsFrameMessageManager.h"
|
||||
#include "nsIObserver.h"
|
||||
|
@ -30,9 +31,6 @@
|
|||
|
||||
#define CHILD_PROCESS_SHUTDOWN_MESSAGE NS_LITERAL_STRING("child-process-shutdown")
|
||||
|
||||
#define CONTENT_PARENT_NO_CHILD_ID 0
|
||||
#define CONTENT_PARENT_UNKNOWN_CHILD_ID -1
|
||||
|
||||
class mozIApplication;
|
||||
class nsConsoleService;
|
||||
class nsIDOMBlob;
|
||||
|
|
|
@ -11,6 +11,12 @@
|
|||
namespace mozilla {
|
||||
namespace hal {
|
||||
|
||||
/**
|
||||
* XXX
|
||||
*/
|
||||
const uint64_t CONTENT_PROCESS_ID_UNKNOWN = uint64_t(-1);
|
||||
const uint64_t CONTENT_PROCESS_ID_MAIN = 0;
|
||||
|
||||
/**
|
||||
* These are defined by libhardware, specifically, hardware/libhardware/include/hardware/lights.h
|
||||
* in the gonk subsystem.
|
||||
|
|
Загрузка…
Ссылка в новой задаче