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

Side by Side Diff: Source/web/ChromeClientImpl.cpp

Issue 765903002: Remove internals.setEnableMockPagePopup(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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/web/ChromeClientImpl.h ('k') | Source/web/WebViewImpl.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 30 matching lines...) Expand all
41 #include "core/frame/Console.h" 41 #include "core/frame/Console.h"
42 #include "core/frame/FrameView.h" 42 #include "core/frame/FrameView.h"
43 #include "core/frame/Settings.h" 43 #include "core/frame/Settings.h"
44 #include "core/html/HTMLInputElement.h" 44 #include "core/html/HTMLInputElement.h"
45 #include "core/html/forms/ColorChooser.h" 45 #include "core/html/forms/ColorChooser.h"
46 #include "core/html/forms/ColorChooserClient.h" 46 #include "core/html/forms/ColorChooserClient.h"
47 #include "core/html/forms/DateTimeChooser.h" 47 #include "core/html/forms/DateTimeChooser.h"
48 #include "core/loader/DocumentLoader.h" 48 #include "core/loader/DocumentLoader.h"
49 #include "core/loader/FrameLoadRequest.h" 49 #include "core/loader/FrameLoadRequest.h"
50 #include "core/page/Page.h" 50 #include "core/page/Page.h"
51 #include "core/page/PagePopupDriver.h"
52 #include "core/rendering/HitTestResult.h" 51 #include "core/rendering/HitTestResult.h"
53 #include "core/rendering/RenderPart.h" 52 #include "core/rendering/RenderPart.h"
54 #include "core/rendering/compositing/CompositedSelectionBound.h" 53 #include "core/rendering/compositing/CompositedSelectionBound.h"
55 #include "modules/accessibility/AXObject.h" 54 #include "modules/accessibility/AXObject.h"
56 #include "platform/Cursor.h" 55 #include "platform/Cursor.h"
57 #include "platform/FileChooser.h" 56 #include "platform/FileChooser.h"
58 #include "platform/PlatformScreen.h" 57 #include "platform/PlatformScreen.h"
59 #include "platform/RuntimeEnabledFeatures.h" 58 #include "platform/RuntimeEnabledFeatures.h"
60 #include "platform/exported/WrappedResourceRequest.h" 59 #include "platform/exported/WrappedResourceRequest.h"
61 #include "platform/geometry/FloatRect.h" 60 #include "platform/geometry/FloatRect.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // These enums have the same values; enforced in AssertMatchingEnums.cpp. 119 // These enums have the same values; enforced in AssertMatchingEnums.cpp.
121 WebSelectionBound result(static_cast<WebSelectionBound::Type>(bound.type)); 120 WebSelectionBound result(static_cast<WebSelectionBound::Type>(bound.type));
122 result.layerId = bound.layer->platformLayer()->id(); 121 result.layerId = bound.layer->platformLayer()->id();
123 result.edgeTopInLayer = roundedIntPoint(bound.edgeTopInLayer); 122 result.edgeTopInLayer = roundedIntPoint(bound.edgeTopInLayer);
124 result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer); 123 result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer);
125 return result; 124 return result;
126 } 125 }
127 126
128 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) 127 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView)
129 : m_webView(webView) 128 : m_webView(webView)
130 , m_pagePopupDriver(webView)
131 { 129 {
132 } 130 }
133 131
134 ChromeClientImpl::~ChromeClientImpl() 132 ChromeClientImpl::~ChromeClientImpl()
135 { 133 {
136 } 134 }
137 135
138 void* ChromeClientImpl::webView() const 136 void* ChromeClientImpl::webView() const
139 { 137 {
140 return static_cast<void*>(m_webView); 138 return static_cast<void*>(m_webView);
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) const 721 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) const
724 { 722 {
725 if (WebViewImpl::useExternalPopupMenus()) 723 if (WebViewImpl::useExternalPopupMenus())
726 return adoptRefWillBeNoop(new ExternalPopupMenu(frame, client, *m_webVie w)); 724 return adoptRefWillBeNoop(new ExternalPopupMenu(frame, client, *m_webVie w));
727 725
728 return adoptRefWillBeNoop(new PopupMenuChromium(frame, client)); 726 return adoptRefWillBeNoop(new PopupMenuChromium(frame, client));
729 } 727 }
730 728
731 PagePopup* ChromeClientImpl::openPagePopup(PagePopupClient* client, const IntRec t& originBoundsInRootView) 729 PagePopup* ChromeClientImpl::openPagePopup(PagePopupClient* client, const IntRec t& originBoundsInRootView)
732 { 730 {
733 ASSERT(m_pagePopupDriver); 731 return m_webView->openPagePopup(client, originBoundsInRootView);
734 return m_pagePopupDriver->openPagePopup(client, originBoundsInRootView);
735 } 732 }
736 733
737 void ChromeClientImpl::closePagePopup(PagePopup* popup) 734 void ChromeClientImpl::closePagePopup(PagePopup* popup)
738 { 735 {
739 ASSERT(m_pagePopupDriver); 736 m_webView->closePagePopup(popup);
740 m_pagePopupDriver->closePagePopup(popup);
741 } 737 }
742 738
743 void ChromeClientImpl::setPagePopupDriver(PagePopupDriver* driver) 739 DOMWindow* ChromeClientImpl::pagePopupWindowForTesting() const
744 { 740 {
745 ASSERT(driver); 741 return m_webView->pagePopupWindow();
746 m_pagePopupDriver = driver;
747 }
748
749 void ChromeClientImpl::resetPagePopupDriver()
750 {
751 m_pagePopupDriver = m_webView;
752 } 742 }
753 743
754 bool ChromeClientImpl::shouldRunModalDialogDuringPageDismissal(const DialogType& dialogType, const String& dialogMessage, Document::PageDismissalType dismissalT ype) const 744 bool ChromeClientImpl::shouldRunModalDialogDuringPageDismissal(const DialogType& dialogType, const String& dialogMessage, Document::PageDismissalType dismissalT ype) const
755 { 745 {
756 const char* kDialogs[] = {"alert", "confirm", "prompt", "showModalDialog"}; 746 const char* kDialogs[] = {"alert", "confirm", "prompt", "showModalDialog"};
757 int dialog = static_cast<int>(dialogType); 747 int dialog = static_cast<int>(dialogType);
758 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog && dialog < static_cast<int>(ar raysize(kDialogs))); 748 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog && dialog < static_cast<int>(ar raysize(kDialogs)));
759 749
760 const char* kDismissals[] = {"beforeunload", "pagehide", "unload"}; 750 const char* kDismissals[] = {"beforeunload", "pagehide", "unload"};
761 int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal. 751 int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 } 864 }
875 865
876 void ChromeClientImpl::textFieldDataListChanged(HTMLFormControlElement& element) 866 void ChromeClientImpl::textFieldDataListChanged(HTMLFormControlElement& element)
877 { 867 {
878 if (!m_webView->autofillClient()) 868 if (!m_webView->autofillClient())
879 return; 869 return;
880 m_webView->autofillClient()->textFieldDidChange(WebFormControlElement(&eleme nt)); 870 m_webView->autofillClient()->textFieldDidChange(WebFormControlElement(&eleme nt));
881 } 871 }
882 872
883 } // namespace blink 873 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698