Bug 1400898 part 4. Get rid of nsIDOMChromeWindow methods that are unused from C++, and mark the rest [noscript]. r=farre

MozReview-Commit-ID: GtYmfg6XiaQ
This commit is contained in:
Boris Zbarsky 2017-09-19 10:13:23 -04:00
Родитель ff472070b5
Коммит d9be58174d
2 изменённых файлов: 5 добавлений и 128 удалений

Просмотреть файл

@ -14065,15 +14065,6 @@ nsGlobalChromeWindow::Create(nsGlobalWindow *aOuterWindow)
return window.forget();
}
NS_IMETHODIMP
nsGlobalChromeWindow::GetWindowState(uint16_t* aWindowState)
{
FORWARD_TO_INNER_CHROME(GetWindowState, (aWindowState), NS_ERROR_UNEXPECTED);
*aWindowState = WindowState();
return NS_OK;
}
enum WindowState {
// These constants need to match the constants in Window.webidl
STATE_MAXIMIZED = 1,
@ -14116,15 +14107,6 @@ nsGlobalWindow::IsFullyOccluded()
return widget && widget->IsFullyOccluded();
}
NS_IMETHODIMP
nsGlobalChromeWindow::Maximize()
{
FORWARD_TO_INNER_CHROME(Maximize, (), NS_ERROR_UNEXPECTED);
nsGlobalWindow::Maximize();
return NS_OK;
}
void
nsGlobalWindow::Maximize()
{
@ -14137,15 +14119,6 @@ nsGlobalWindow::Maximize()
}
}
NS_IMETHODIMP
nsGlobalChromeWindow::Minimize()
{
FORWARD_TO_INNER_CHROME(Minimize, (), NS_ERROR_UNEXPECTED);
nsGlobalWindow::Minimize();
return NS_OK;
}
void
nsGlobalWindow::Minimize()
{
@ -14158,15 +14131,6 @@ nsGlobalWindow::Minimize()
}
}
NS_IMETHODIMP
nsGlobalChromeWindow::Restore()
{
FORWARD_TO_INNER_CHROME(Restore, (), NS_ERROR_UNEXPECTED);
nsGlobalWindow::Restore();
return NS_OK;
}
void
nsGlobalWindow::Restore()
{
@ -14179,16 +14143,6 @@ nsGlobalWindow::Restore()
}
}
NS_IMETHODIMP
nsGlobalChromeWindow::GetAttention()
{
FORWARD_TO_INNER_CHROME(GetAttention, (), NS_ERROR_UNEXPECTED);
ErrorResult rv;
GetAttention(rv);
return rv.StealNSResult();
}
void
nsGlobalWindow::GetAttention(ErrorResult& aResult)
{
@ -14196,16 +14150,6 @@ nsGlobalWindow::GetAttention(ErrorResult& aResult)
return GetAttentionWithCycleCount(-1, aResult);
}
NS_IMETHODIMP
nsGlobalChromeWindow::GetAttentionWithCycleCount(int32_t aCycleCount)
{
FORWARD_TO_INNER_CHROME(GetAttentionWithCycleCount, (aCycleCount), NS_ERROR_UNEXPECTED);
ErrorResult rv;
GetAttentionWithCycleCount(aCycleCount, rv);
return rv.StealNSResult();
}
void
nsGlobalWindow::GetAttentionWithCycleCount(int32_t aCycleCount,
ErrorResult& aError)
@ -14219,23 +14163,6 @@ nsGlobalWindow::GetAttentionWithCycleCount(int32_t aCycleCount,
}
}
NS_IMETHODIMP
nsGlobalChromeWindow::BeginWindowMove(nsIDOMEvent *aMouseDownEvent, nsIDOMElement* aPanel)
{
FORWARD_TO_INNER_CHROME(BeginWindowMove, (aMouseDownEvent, aPanel), NS_ERROR_UNEXPECTED);
NS_ENSURE_TRUE(aMouseDownEvent, NS_ERROR_FAILURE);
Event* mouseDownEvent = aMouseDownEvent->InternalDOMEvent();
NS_ENSURE_TRUE(mouseDownEvent, NS_ERROR_FAILURE);
nsCOMPtr<Element> panel = do_QueryInterface(aPanel);
NS_ENSURE_TRUE(panel || !aPanel, NS_ERROR_FAILURE);
ErrorResult rv;
BeginWindowMove(*mouseDownEvent, panel, rv);
return rv.StealNSResult();
}
void
nsGlobalWindow::BeginWindowMove(Event& aMouseDownEvent, Element* aPanel,
ErrorResult& aError)
@ -14291,16 +14218,6 @@ nsGlobalWindow::GetWindowRoot(mozilla::ErrorResult& aError)
//Note: This call will lock the cursor, it will not change as it moves.
//To unlock, the cursor must be set back to CURSOR_AUTO.
NS_IMETHODIMP
nsGlobalChromeWindow::SetCursor(const nsAString& aCursor)
{
FORWARD_TO_INNER_CHROME(SetCursor, (aCursor), NS_ERROR_UNEXPECTED);
ErrorResult rv;
SetCursor(aCursor, rv);
return rv.StealNSResult();
}
void
nsGlobalWindow::SetCursorOuter(const nsAString& aCursor, ErrorResult& aError)
{
@ -14400,20 +14317,6 @@ nsGlobalWindow::SetBrowserDOMWindow(nsIBrowserDOMWindow* aBrowserWindow,
FORWARD_TO_OUTER_OR_THROW(SetBrowserDOMWindowOuter, (aBrowserWindow), aError, );
}
NS_IMETHODIMP
nsGlobalChromeWindow::NotifyDefaultButtonLoaded(nsIDOMElement* aDefaultButton)
{
FORWARD_TO_INNER_CHROME(NotifyDefaultButtonLoaded,
(aDefaultButton), NS_ERROR_UNEXPECTED);
nsCOMPtr<Element> defaultButton = do_QueryInterface(aDefaultButton);
NS_ENSURE_ARG(defaultButton);
ErrorResult rv;
NotifyDefaultButtonLoaded(*defaultButton, rv);
return rv.StealNSResult();
}
void
nsGlobalWindow::NotifyDefaultButtonLoaded(Element& aDefaultButton,
ErrorResult& aError)

Просмотреть файл

@ -15,52 +15,24 @@ interface mozIDOMWindowProxy;
[scriptable, builtinclass, uuid(78bdcb41-1efa-409f-aaba-70842213f80f)]
interface nsIDOMChromeWindow : nsISupports
{
readonly attribute unsigned short windowState;
/**
* browserDOMWindow provides access to yet another layer of
* utility functions implemented by chrome script. It will be null
* for DOMWindows not corresponding to browsers.
*/
[noscript]
readonly attribute nsIBrowserDOMWindow browserDOMWindow;
void getAttention();
void getAttentionWithCycleCount(in long aCycleCount);
void setCursor(in DOMString cursor);
void maximize();
void minimize();
void restore();
/**
* Notify a default button is loaded on a dialog or a wizard.
* defaultButton is the default button.
*/
void notifyDefaultButtonLoaded(in nsIDOMElement defaultButton);
[noscript]
readonly attribute nsIMessageBroadcaster messageManager;
/**
* Returns the message manager identified by the given group name that
* manages all frame loaders belonging to that group.
*/
[noscript]
nsIMessageBroadcaster getGroupMessageManager(in AString group);
/**
* On some operating systems, we must allow the window manager to
* handle window dragging. This function tells the window manager to
* start dragging the window. This function will fail unless called
* while the left mouse button is held down, callers must check this.
*
* The optional panel argument should be set when moving a panel.
*
* Returns NS_ERROR_NOT_IMPLEMENTED (and thus throws in JS) if the OS
* doesn't support this.
*/
void beginWindowMove(in nsIDOMEvent mouseDownEvent, [optional] in nsIDOMElement panel);
/**
* These methods provide a way to specify the opener value for the content in
* the window before the content itself is created. This is important in order
@ -72,6 +44,8 @@ interface nsIDOMChromeWindow : nsISupports
* take the value set earlier, and null out the value in the
* nsIDOMChromeWindow.
*/
[noscript]
void setOpenerForInitialContentBrowser(in mozIDOMWindowProxy aOpener);
[noscript]
mozIDOMWindowProxy takeOpenerForInitialContentBrowser();
};