mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 761927, part 0: Add casting helpers and clean house a little. r=jlebar
This commit is contained in:
parent
0cdf1d13a9
commit
d17e510433
@ -523,6 +523,27 @@ TabParent::SendSelectionEvent(nsSelectionEvent& event)
|
||||
return PBrowserParent::SendSelectionEvent(event);
|
||||
}
|
||||
|
||||
/*static*/ TabParent*
|
||||
TabParent::GetFrom(nsFrameLoader* aFrameLoader)
|
||||
{
|
||||
if (!aFrameLoader) {
|
||||
return nsnull;
|
||||
}
|
||||
PBrowserParent* remoteBrowser = aFrameLoader->GetRemoteBrowser();
|
||||
return static_cast<TabParent*>(remoteBrowser);
|
||||
}
|
||||
|
||||
/*static*/ TabParent*
|
||||
TabParent::GetFrom(nsIContent* aContent)
|
||||
{
|
||||
nsCOMPtr<nsIFrameLoaderOwner> loaderOwner = do_QueryInterface(aContent);
|
||||
if (!loaderOwner) {
|
||||
return nsnull;
|
||||
}
|
||||
nsRefPtr<nsFrameLoader> frameLoader = loaderOwner->GetFrameLoader();
|
||||
return GetFrom(frameLoader);
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvEndIMEComposition(const bool& aCancel,
|
||||
nsString* aComposition)
|
||||
|
@ -7,26 +7,26 @@
|
||||
#ifndef mozilla_tabs_TabParent_h
|
||||
#define mozilla_tabs_TabParent_h
|
||||
|
||||
#include "base/basictypes.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/dom/PBrowserParent.h"
|
||||
#include "mozilla/dom/PContentDialogParent.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsITabParent.h"
|
||||
#include "nsIBrowserDOMWindow.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIDialogParamBlock.h"
|
||||
#include "nsIAuthPromptProvider.h"
|
||||
#include "nsIBrowserDOMWindow.h"
|
||||
#include "nsIDialogParamBlock.h"
|
||||
#include "nsISecureBrowserUI.h"
|
||||
#include "nsITabParent.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsFrameLoader;
|
||||
class nsIURI;
|
||||
class nsIDOMElement;
|
||||
struct gfxMatrix;
|
||||
|
||||
struct JSContext;
|
||||
struct JSObject;
|
||||
class nsFrameLoader;
|
||||
class nsIDOMElement;
|
||||
class nsIURI;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -154,6 +154,10 @@ public:
|
||||
bool SendCompositionEvent(nsCompositionEvent& event);
|
||||
bool SendTextEvent(nsTextEvent& event);
|
||||
bool SendSelectionEvent(nsSelectionEvent& event);
|
||||
|
||||
static TabParent* GetFrom(nsFrameLoader* aFrameLoader);
|
||||
static TabParent* GetFrom(nsIContent* aContent);
|
||||
|
||||
protected:
|
||||
bool ReceiveMessage(const nsString& aMessage,
|
||||
bool aSync,
|
||||
|
Loading…
Reference in New Issue
Block a user