зеркало из https://github.com/mozilla/gecko-dev.git
Bug 570620, part m: Add API for attaching a "remote frame" to its corresponding nsFrameLoader, so that the frame can be found during painting. r=tn sr=smaug
This commit is contained in:
Родитель
2fb1bf4b41
Коммит
09c6ca9f24
|
@ -65,6 +65,10 @@ namespace dom {
|
|||
class PBrowserParent;
|
||||
class TabParent;
|
||||
}
|
||||
|
||||
namespace layout {
|
||||
class RenderFrameParent;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
|
@ -81,6 +85,7 @@ class nsFrameLoader : public nsIFrameLoader
|
|||
#ifdef MOZ_IPC
|
||||
typedef mozilla::dom::PBrowserParent PBrowserParent;
|
||||
typedef mozilla::dom::TabParent TabParent;
|
||||
typedef mozilla::layout::RenderFrameParent RenderFrameParent;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
@ -98,6 +103,7 @@ protected:
|
|||
, mDelayRemoteDialogs(PR_FALSE)
|
||||
, mRemoteBrowserShown(PR_FALSE)
|
||||
, mRemoteFrame(false)
|
||||
, mCurrentRemoteFrame(nsnull)
|
||||
, mRemoteBrowser(nsnull)
|
||||
#endif
|
||||
{}
|
||||
|
@ -168,6 +174,35 @@ public:
|
|||
|
||||
#ifdef MOZ_IPC
|
||||
PBrowserParent* GetRemoteBrowser();
|
||||
|
||||
/**
|
||||
* The "current" render frame is the one on which the most recent
|
||||
* remote layer-tree transaction was executed. If no content has
|
||||
* been drawn yet, or the remote browser doesn't have any drawn
|
||||
* content for whatever reason, return NULL. The returned render
|
||||
* frame has an associated shadow layer tree.
|
||||
*
|
||||
* Note that the returned render frame might not be a frame
|
||||
* constructed for this->GetURL(). This can happen, e.g., if the
|
||||
* <browser> was just navigated to a new URL, but hasn't painted the
|
||||
* new page yet. A render frame for the previous page may be
|
||||
* returned. (In-process <browser> behaves similarly, and this
|
||||
* behavior seems desirable.)
|
||||
*/
|
||||
RenderFrameParent* GetCurrentRemoteFrame() const
|
||||
{
|
||||
return mCurrentRemoteFrame;
|
||||
}
|
||||
|
||||
/**
|
||||
* |aFrame| can be null. If non-null, it must be the remote frame
|
||||
* on which the most recent layer transaction completed for this's
|
||||
* <browser>.
|
||||
*/
|
||||
void SetCurrentRemoteFrame(RenderFrameParent* aFrame)
|
||||
{
|
||||
mCurrentRemoteFrame = aFrame;
|
||||
}
|
||||
#endif
|
||||
nsFrameMessageManager* GetFrameMessageManager() { return mMessageManager; }
|
||||
|
||||
|
@ -229,6 +264,7 @@ private:
|
|||
bool mRemoteFrame;
|
||||
// XXX leaking
|
||||
nsCOMPtr<nsIObserver> mChildHost;
|
||||
RenderFrameParent* mCurrentRemoteFrame;
|
||||
TabParent* mRemoteBrowser;
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче