Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1017)

Unified Diff: Source/core/frame/DOMWindow.cpp

Issue 174073007: Remove deprecated window.showModalDialog() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/DOMWindow.cpp
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp
index 7bfecdee84e8bc7e3e3c4673e293e9d60d05dbeb..a0a247a835b71353940ff097f589e88cc2750a42 100644
--- a/Source/core/frame/DOMWindow.cpp
+++ b/Source/core/frame/DOMWindow.cpp
@@ -311,26 +311,6 @@ bool DOMWindow::allowPopUp()
return m_frame && allowPopUp(m_frame);
}
-bool DOMWindow::canShowModalDialog(const Frame* frame)
-{
- if (!frame)
- return false;
- FrameHost* host = frame->host();
- if (!host)
- return false;
- return host->chrome().canRunModal();
-}
-
-bool DOMWindow::canShowModalDialogNow(const Frame* frame)
-{
- if (!frame)
- return false;
- FrameHost* host = frame->host();
- if (!host)
- return false;
- return host->chrome().canRunModalNow();
-}
-
DOMWindow::DOMWindow(Frame* frame)
: FrameDestructionObserver(frame)
, m_shouldPrintWhenFinishedLoading(false)
@@ -1846,32 +1826,6 @@ PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicStrin
return result ? result->domWindow() : 0;
}
-void DOMWindow::showModalDialog(const String& urlString, const String& dialogFeaturesString,
- DOMWindow* callingWindow, DOMWindow* enteredWindow, PrepareDialogFunction function, void* functionContext)
-{
- if (!isCurrentlyDisplayedInFrame())
- return;
- Frame* activeFrame = callingWindow->frame();
- if (!activeFrame)
- return;
- Frame* firstFrame = enteredWindow->frame();
- if (!firstFrame)
- return;
-
- if (!canShowModalDialogNow(m_frame) || !enteredWindow->allowPopUp())
- return;
-
- UseCounter::countDeprecation(this, UseCounter::ShowModalDialog);
-
- WindowFeatures windowFeatures(dialogFeaturesString, screenAvailableRect(m_frame->view()));
- Frame* dialogFrame = createWindow(urlString, emptyAtom, windowFeatures,
- callingWindow, firstFrame, m_frame, function, functionContext);
- if (!dialogFrame)
- return;
- UserGestureIndicatorDisabler disabler;
- dialogFrame->host()->chrome().runModal();
-}
-
DOMWindow* DOMWindow::anonymousIndexedGetter(uint32_t index)
{
Frame* frame = this->frame();
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698