From 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Thu, 2 Jun 2011 12:07:03 +0100 Subject: Merge WebKit at r84325: Initial merge by git. Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b --- Source/WebKit/chromium/src/ChromeClientImpl.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Source/WebKit/chromium/src/ChromeClientImpl.cpp') diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp index 99302cc..f12bf03 100644 --- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp @@ -54,6 +54,7 @@ #include "Node.h" #include "NotificationPresenterImpl.h" #include "Page.h" +#include "PlatformBridge.h" #include "PopupMenuChromium.h" #include "RenderWidget.h" #include "ScriptController.h" @@ -682,6 +683,22 @@ void ChromeClientImpl::chooseIconForFiles(const Vector& filenames, FileC iconCompletion->didLoadIcon(WebData()); } +#if ENABLE(DIRECTORY_UPLOAD) +void ChromeClientImpl::enumerateChosenDirectory(const String& path, FileChooser* fileChooser) +{ + WebViewClient* client = m_webView->client(); + if (!client) + return; + + WebFileChooserCompletionImpl* chooserCompletion = + new WebFileChooserCompletionImpl(fileChooser); + + // If the enumeration can't happen, call the callback with an empty list. + if (!client->enumerateChosenDirectory(path, chooserCompletion)) + chooserCompletion->didChooseFile(WebVector()); +} +#endif + void ChromeClientImpl::popupOpened(PopupContainer* popupContainer, const IntRect& bounds, bool handleExternally) @@ -905,4 +922,9 @@ PassRefPtr ChromeClientImpl::createSearchPopupMenu(PopupMenuCli return adoptRef(new SearchPopupMenuChromium(client)); } +void ChromeClientImpl::willRunModalDialogDuringPageDismissal(const DialogType& dialogType) const +{ + PlatformBridge::histogramEnumeration("Renderer.ModalDialogsDuringPageDismissal", static_cast(dialogType), static_cast(NumDialogTypes)); +} + } // namespace WebKit -- cgit v1.1