Bug 1020172 - Part 3: Use TabId to replace uint64_t of PBrowserOrId. r=khuey

This commit is contained in:
Kershaw Chang 2014-10-24 02:29:00 -04:00
parent 922d41136b
commit 47d32381b8
8 changed files with 14 additions and 12 deletions

View File

@ -303,7 +303,7 @@ NeckoChild::DeallocPChannelDiverterChild(PChannelDiverterChild* child)
}
bool
NeckoChild::RecvAsyncAuthPromptForNestedFrame(const uint64_t& aNestedFrameId,
NeckoChild::RecvAsyncAuthPromptForNestedFrame(const TabId& aNestedFrameId,
const nsCString& aUri,
const nsString& aRealm,
const uint64_t& aCallbackId)

View File

@ -71,7 +71,7 @@ protected:
AllocPChannelDiverterChild(const ChannelDiverterArgs& channel) MOZ_OVERRIDE;
virtual bool
DeallocPChannelDiverterChild(PChannelDiverterChild* actor) MOZ_OVERRIDE;
virtual bool RecvAsyncAuthPromptForNestedFrame(const uint64_t& aNestedFrameId,
virtual bool RecvAsyncAuthPromptForNestedFrame(const TabId& aNestedFrameId,
const nsCString& aUri,
const nsString& aRealm,
const uint64_t& aCallbackId) MOZ_OVERRIDE;

View File

@ -188,9 +188,9 @@ NeckoParent::CreateChannelLoadContext(const PBrowserOrId& aBrowser,
appId, inBrowser);
break;
}
case PBrowserOrId::Tuint64_t:
case PBrowserOrId::TTabId:
{
aResult = new LoadContext(aSerialized, aBrowser.get_uint64_t(),
aResult = new LoadContext(aSerialized, aBrowser.get_TabId(),
appId, inBrowser);
break;
}
@ -733,7 +733,7 @@ CallbackMap()
NS_IMPL_ISUPPORTS(NeckoParent::NestedFrameAuthPrompt, nsIAuthPrompt2)
NeckoParent::NestedFrameAuthPrompt::NestedFrameAuthPrompt(PNeckoParent* aParent,
uint64_t aNestedFrameId)
TabId aNestedFrameId)
: mNeckoParent(aParent)
, mNestedFrameId(aNestedFrameId)
{}

View File

@ -78,7 +78,7 @@ public:
public:
NS_DECL_ISUPPORTS
NestedFrameAuthPrompt(PNeckoParent* aParent, uint64_t aNestedFrameId);
NestedFrameAuthPrompt(PNeckoParent* aParent, TabId aNestedFrameId);
NS_IMETHOD PromptAuth(nsIChannel*, uint32_t, nsIAuthInformation*, bool*)
{
@ -98,7 +98,7 @@ public:
protected:
PNeckoParent* mNeckoParent;
uint64_t mNestedFrameId;
TabId mNestedFrameId;
};
protected:

View File

@ -29,6 +29,7 @@ include NeckoChannelParams;
include PBrowserOrId;
using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
namespace mozilla {
namespace net {
@ -93,7 +94,7 @@ child:
* NestedFrameId is the id corresponding to the PBrowser. It is the same id
* that was passed to the PBrowserOrId param in to the PHttpChannel constructor
*/
AsyncAuthPromptForNestedFrame(uint64_t nestedFrameId, nsCString uri,
AsyncAuthPromptForNestedFrame(TabId nestedFrameId, nsCString uri,
nsString realm, uint64_t callbackId);
// Notifies child that a given app is now offline (or online)
AppOfflineStatus(uint32_t appId, bool offline);

View File

@ -1055,7 +1055,7 @@ HttpChannelChild::ConnectParent(uint32_t id)
static_cast<ContentChild*>(gNeckoChild->Manager()) == tabChild->Manager()) {
browser = tabChild;
} else {
browser = TabChild::GetTabChildId(tabChild);
browser = tabChild->GetTabId();
}
if (!gNeckoChild->
SendPHttpChannelConstructor(this, browser,
@ -1510,7 +1510,7 @@ HttpChannelChild::ContinueAsyncOpen()
static_cast<ContentChild*>(gNeckoChild->Manager()) == tabChild->Manager()) {
browser = tabChild;
} else {
browser = TabChild::GetTabChildId(tabChild);
browser = tabChild->GetTabId();
}
gNeckoChild->SendPHttpChannelConstructor(this, browser,
IPC::SerializedLoadContext(this),

View File

@ -67,7 +67,7 @@ HttpChannelParent::HttpChannelParent(const PBrowserOrId& iframeEmbedding,
if (iframeEmbedding.type() == PBrowserOrId::TPBrowserParent) {
mTabParent = static_cast<dom::TabParent*>(iframeEmbedding.get_PBrowserParent());
} else {
mNestedFrameId = iframeEmbedding.get_uint64_t();
mNestedFrameId = iframeEmbedding.get_TabId();
}
mObserver = new OfflineObserver(this);

View File

@ -19,6 +19,7 @@
#include "nsIProgressEventSink.h"
#include "nsHttpChannel.h"
#include "nsIAuthPromptProvider.h"
#include "mozilla/dom/ipc/IdType.h"
class nsICacheEntry;
class nsIAssociatedContentSecurity;
@ -185,7 +186,7 @@ private:
bool mSuspendedForDiversion;
uint64_t mNestedFrameId;
dom::TabId mNestedFrameId;
};
} // namespace net