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

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

Issue 1149093010: Cleanup: Rename ChromeClient function names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/forms/ColorInputType.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled()) 819 if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled())
820 return; 820 return;
821 } 821 }
822 822
823 frame()->document()->updateLayoutTreeIfNeeded(); 823 frame()->document()->updateLayoutTreeIfNeeded();
824 824
825 FrameHost* host = frame()->host(); 825 FrameHost* host = frame()->host();
826 if (!host) 826 if (!host)
827 return; 827 return;
828 828
829 host->chromeClient().runJavaScriptAlert(frame(), message); 829 host->chromeClient().openJavaScriptAlert(frame(), message);
830 } 830 }
831 831
832 bool LocalDOMWindow::confirm(const String& message) 832 bool LocalDOMWindow::confirm(const String& message)
833 { 833 {
834 if (!frame()) 834 if (!frame())
835 return false; 835 return false;
836 836
837 if (frame()->document()->isSandboxed(SandboxModals)) { 837 if (frame()->document()->isSandboxed(SandboxModals)) {
838 UseCounter::count(frame()->document(), UseCounter::DialogInSandboxedCont ext); 838 UseCounter::count(frame()->document(), UseCounter::DialogInSandboxedCont ext);
839 if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled()) 839 if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled())
840 return false; 840 return false;
841 } 841 }
842 842
843 frame()->document()->updateLayoutTreeIfNeeded(); 843 frame()->document()->updateLayoutTreeIfNeeded();
844 844
845 FrameHost* host = frame()->host(); 845 FrameHost* host = frame()->host();
846 if (!host) 846 if (!host)
847 return false; 847 return false;
848 848
849 if (frame()->document()->isSandboxed(SandboxModals)) { 849 if (frame()->document()->isSandboxed(SandboxModals)) {
850 UseCounter::count(frame()->document(), UseCounter::DialogInSandboxedCont ext); 850 UseCounter::count(frame()->document(), UseCounter::DialogInSandboxedCont ext);
851 if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled()) 851 if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled())
852 return false; 852 return false;
853 } 853 }
854 854
855 return host->chromeClient().runJavaScriptConfirm(frame(), message); 855 return host->chromeClient().openJavaScriptConfirm(frame(), message);
856 } 856 }
857 857
858 String LocalDOMWindow::prompt(const String& message, const String& defaultValue) 858 String LocalDOMWindow::prompt(const String& message, const String& defaultValue)
859 { 859 {
860 if (!frame()) 860 if (!frame())
861 return String(); 861 return String();
862 862
863 if (frame()->document()->isSandboxed(SandboxModals)) { 863 if (frame()->document()->isSandboxed(SandboxModals)) {
864 UseCounter::count(frame()->document(), UseCounter::DialogInSandboxedCont ext); 864 UseCounter::count(frame()->document(), UseCounter::DialogInSandboxedCont ext);
865 if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled()) 865 if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled())
866 return String(); 866 return String();
867 } 867 }
868 868
869 frame()->document()->updateLayoutTreeIfNeeded(); 869 frame()->document()->updateLayoutTreeIfNeeded();
870 870
871 FrameHost* host = frame()->host(); 871 FrameHost* host = frame()->host();
872 if (!host) 872 if (!host)
873 return String(); 873 return String();
874 874
875 String returnValue; 875 String returnValue;
876 if (host->chromeClient().runJavaScriptPrompt(frame(), message, defaultValue, returnValue)) 876 if (host->chromeClient().openJavaScriptPrompt(frame(), message, defaultValue , returnValue))
877 return returnValue; 877 return returnValue;
878 878
879 return String(); 879 return String();
880 } 880 }
881 881
882 bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar ds, bool wrap, bool wholeWord, bool /*searchInFrames*/, bool /*showDialog*/) con st 882 bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar ds, bool wrap, bool wholeWord, bool /*searchInFrames*/, bool /*showDialog*/) con st
883 { 883 {
884 if (!isCurrentlyDisplayedInFrame()) 884 if (!isCurrentlyDisplayedInFrame())
885 return false; 885 return false;
886 886
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 DOMWindow::trace(visitor); 1526 DOMWindow::trace(visitor);
1527 DOMWindowLifecycleNotifier::trace(visitor); 1527 DOMWindowLifecycleNotifier::trace(visitor);
1528 } 1528 }
1529 1529
1530 LocalFrame* LocalDOMWindow::frame() const 1530 LocalFrame* LocalDOMWindow::frame() const
1531 { 1531 {
1532 return m_frameObserver->frame(); 1532 return m_frameObserver->frame();
1533 } 1533 }
1534 1534
1535 } // namespace blink 1535 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/forms/ColorInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698