зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1234583 -Expose OS Pid in nsITabParent. r=billm
This commit is contained in:
Родитель
f6bc83a18a
Коммит
8de309e78f
|
@ -54,6 +54,11 @@ interface nsITabParent : nsISupports
|
|||
|
||||
readonly attribute uint64_t tabId;
|
||||
|
||||
/**
|
||||
* The OS level process Id of the related child process.
|
||||
*/
|
||||
readonly attribute int32_t osPid;
|
||||
|
||||
/**
|
||||
* Navigate by key. If aForDocumentNavigation is true, navigate by document.
|
||||
* If aForDocumentNavigation is false, navigate by element.
|
||||
|
|
|
@ -62,6 +62,11 @@ public:
|
|||
{
|
||||
return mIsForBrowser;
|
||||
}
|
||||
virtual int32_t Pid() const override
|
||||
{
|
||||
// XXX: do we need this for ContentBridgeParent?
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~ContentBridgeParent();
|
||||
|
|
|
@ -386,8 +386,6 @@ public:
|
|||
return mSubprocess;
|
||||
}
|
||||
|
||||
int32_t Pid() const;
|
||||
|
||||
ContentParent* Opener() const
|
||||
{
|
||||
return mOpener;
|
||||
|
@ -591,6 +589,8 @@ public:
|
|||
virtual bool
|
||||
RecvUnstoreAndBroadcastBlobURLUnregistration(const nsCString& aURI) override;
|
||||
|
||||
virtual int32_t Pid() const override;
|
||||
|
||||
protected:
|
||||
void OnChannelConnected(int32_t pid) override;
|
||||
|
||||
|
|
|
@ -2943,6 +2943,13 @@ TabParent::GetTabId(uint64_t* aId)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TabParent::GetOsPid(int32_t* aId)
|
||||
{
|
||||
*aId = Manager()->Pid();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TabParent::GetHasContentOpener(bool* aResult)
|
||||
{
|
||||
|
|
|
@ -82,6 +82,8 @@ public:
|
|||
|
||||
ContentBridgeParent* AsContentBridgeParent();
|
||||
|
||||
virtual int32_t Pid() const = 0;
|
||||
|
||||
protected: // methods
|
||||
bool CanOpenBrowser(const IPCTabContext& aContext);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче