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

Side by Side Diff: Source/core/frame/DOMWindow.cpp

Issue 51033005: Add a use counter and deprecation message for showModalDialog (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 Frame* activeFrame = activeWindow->frame(); 1841 Frame* activeFrame = activeWindow->frame();
1842 if (!activeFrame) 1842 if (!activeFrame)
1843 return; 1843 return;
1844 Frame* firstFrame = firstWindow->frame(); 1844 Frame* firstFrame = firstWindow->frame();
1845 if (!firstFrame) 1845 if (!firstFrame)
1846 return; 1846 return;
1847 1847
1848 if (!canShowModalDialogNow(m_frame) || !firstWindow->allowPopUp()) 1848 if (!canShowModalDialogNow(m_frame) || !firstWindow->allowPopUp())
1849 return; 1849 return;
1850 1850
1851 UseCounter::countDeprecation(this, UseCounter::ShowModalDialog);
1852
1851 WindowFeatures windowFeatures(dialogFeaturesString, screenAvailableRect(m_fr ame->view())); 1853 WindowFeatures windowFeatures(dialogFeaturesString, screenAvailableRect(m_fr ame->view()));
1852 Frame* dialogFrame = createWindow(urlString, emptyAtom, windowFeatures, 1854 Frame* dialogFrame = createWindow(urlString, emptyAtom, windowFeatures,
1853 activeWindow, firstFrame, m_frame, function, functionContext); 1855 activeWindow, firstFrame, m_frame, function, functionContext);
1854 if (!dialogFrame) 1856 if (!dialogFrame)
1855 return; 1857 return;
1856 UserGestureIndicatorDisabler disabler; 1858 UserGestureIndicatorDisabler disabler;
1857 dialogFrame->page()->chrome().runModal(); 1859 dialogFrame->page()->chrome().runModal();
1858 } 1860 }
1859 1861
1860 DOMWindow* DOMWindow::anonymousIndexedGetter(uint32_t index) 1862 DOMWindow* DOMWindow::anonymousIndexedGetter(uint32_t index)
(...skipping 14 matching lines...) Expand all
1875 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext::lifecycleN otifier()); 1877 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext::lifecycleN otifier());
1876 } 1878 }
1877 1879
1878 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() 1880 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier()
1879 { 1881 {
1880 return DOMWindowLifecycleNotifier::create(this); 1882 return DOMWindowLifecycleNotifier::create(this);
1881 } 1883 }
1882 1884
1883 1885
1884 } // namespace WebCore 1886 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698