зеркало из https://github.com/mozilla/gecko-dev.git
add ability to stop chained urls r=sspitzer part of work for 73833
This commit is contained in:
Родитель
36236a0f47
Коммит
e2df0d566f
|
@ -49,7 +49,13 @@ interface nsIMsgWindow : nsISupports {
|
|||
readonly attribute nsIPrompt promptDialog;
|
||||
readonly attribute nsIAuthPrompt authPromptDialog;
|
||||
attribute wstring mailCharacterSet;
|
||||
|
||||
|
||||
/* has a running url been stopped? If you care about checking
|
||||
this flag, you need to clear it before you start your operation since
|
||||
there's no convenient place to clear it.
|
||||
*/
|
||||
attribute boolean stopped;
|
||||
|
||||
void SetDOMWindow(in nsIDOMWindowInternal window);
|
||||
void StopUrls();
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS3(nsMsgWindow,
|
|||
|
||||
nsMsgWindow::nsMsgWindow()
|
||||
{
|
||||
m_stopped = PR_FALSE;
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
|
@ -340,6 +341,7 @@ NS_IMETHODIMP nsMsgWindow::SetDOMWindow(nsIDOMWindowInternal *aWindow)
|
|||
|
||||
NS_IMETHODIMP nsMsgWindow::StopUrls()
|
||||
{
|
||||
m_stopped = PR_TRUE;
|
||||
nsCOMPtr<nsIDocShell> docShell;
|
||||
GetRootDocShell(getter_AddRefs(docShell));
|
||||
if (docShell)
|
||||
|
@ -553,3 +555,5 @@ nsMsgWindow::DisplayHTMLInMessagePane(const PRUnichar *title, const PRUnichar *b
|
|||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMPL_GETSET(nsMsgWindow, Stopped, PRBool, m_stopped);
|
||||
|
|
|
@ -61,7 +61,7 @@ protected:
|
|||
nsWeakPtr mMessageWindowDocShellWeak;
|
||||
|
||||
nsString mMailCharacterSet;
|
||||
|
||||
PRBool m_stopped;
|
||||
// small helper function used to optimize our use of a weak reference
|
||||
// on the message window docshell. Under no circumstances should you be holding on to
|
||||
// the docshell returned here outside the scope of your routine.
|
||||
|
|
Загрузка…
Ссылка в новой задаче