mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 864166 - Part d: Outparamdel nsGlobalWindow::GetWebBrowserChrome; r=mounir
This commit is contained in:
parent
58d00148c2
commit
9a7742a5f9
@ -94,9 +94,7 @@ nsBarProp::GetBrowserChrome()
|
||||
if (!domwin)
|
||||
return nullptr;
|
||||
|
||||
nsIWebBrowserChrome *browserChrome = nullptr;
|
||||
mDOMWindow->GetWebBrowserChrome(&browserChrome);
|
||||
return browserChrome;
|
||||
return mDOMWindow->GetWebBrowserChrome();
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3892,9 +3892,8 @@ nsGlobalWindow::SetStatus(const nsAString& aStatus)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWebBrowserChrome> browserChrome;
|
||||
GetWebBrowserChrome(getter_AddRefs(browserChrome));
|
||||
if(browserChrome) {
|
||||
nsCOMPtr<nsIWebBrowserChrome> browserChrome = GetWebBrowserChrome();
|
||||
if (browserChrome) {
|
||||
browserChrome->SetStatus(nsIWebBrowserChrome::STATUS_SCRIPT,
|
||||
PromiseFlatString(aStatus).get());
|
||||
}
|
||||
@ -9769,8 +9768,7 @@ nsGlobalWindow::OpenInternal(const nsAString& aUrl, const nsAString& aName,
|
||||
|
||||
*aReturn = nullptr;
|
||||
|
||||
nsCOMPtr<nsIWebBrowserChrome> chrome;
|
||||
GetWebBrowserChrome(getter_AddRefs(chrome));
|
||||
nsCOMPtr<nsIWebBrowserChrome> chrome = GetWebBrowserChrome();
|
||||
if (!chrome) {
|
||||
// No chrome means we don't want to go through with this open call
|
||||
// -- see nsIWindowWatcher.idl
|
||||
@ -10739,15 +10737,13 @@ nsGlobalWindow::GetTreeOwnerWindow()
|
||||
return baseWindow.forget();
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGlobalWindow::GetWebBrowserChrome(nsIWebBrowserChrome **aBrowserChrome)
|
||||
already_AddRefed<nsIWebBrowserChrome>
|
||||
nsGlobalWindow::GetWebBrowserChrome()
|
||||
{
|
||||
nsCOMPtr<nsIDocShellTreeOwner> treeOwner = GetTreeOwner();
|
||||
|
||||
nsCOMPtr<nsIWebBrowserChrome> browserChrome(do_GetInterface(treeOwner));
|
||||
NS_IF_ADDREF(*aBrowserChrome = browserChrome);
|
||||
|
||||
return NS_OK;
|
||||
nsCOMPtr<nsIWebBrowserChrome> browserChrome = do_GetInterface(treeOwner);
|
||||
return browserChrome.forget();
|
||||
}
|
||||
|
||||
nsIScrollableFrame *
|
||||
|
@ -891,7 +891,7 @@ protected:
|
||||
// Helper Functions
|
||||
already_AddRefed<nsIDocShellTreeOwner> GetTreeOwner();
|
||||
already_AddRefed<nsIBaseWindow> GetTreeOwnerWindow();
|
||||
nsresult GetWebBrowserChrome(nsIWebBrowserChrome** aBrowserChrome);
|
||||
already_AddRefed<nsIWebBrowserChrome> GetWebBrowserChrome();
|
||||
nsresult SecurityCheckURL(const char *aURL);
|
||||
nsresult BuildURIfromBase(const char *aURL,
|
||||
nsIURI **aBuiltURI,
|
||||
|
Loading…
Reference in New Issue
Block a user