From 9f779533d1f78b57b4da6092799016ab8cc96808 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 12 Apr 2010 13:47:30 +0000 Subject: [PATCH] Fix display of file chooser dialog. Signature of WebViewClient::runFileChooser has changed. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@78 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/browser_webview_delegate.cc | 8 ++++---- libcef/browser_webview_delegate.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libcef/browser_webview_delegate.cc b/libcef/browser_webview_delegate.cc index 4cf197516..9b8755042 100644 --- a/libcef/browser_webview_delegate.cc +++ b/libcef/browser_webview_delegate.cc @@ -77,6 +77,7 @@ using WebKit::WebDataSource; using WebKit::WebDragData; using WebKit::WebDragOperationsMask; using WebKit::WebEditingAction; +using WebKit::WebFileChooserParams; using WebKit::WebFormElement; using WebKit::WebFrame; using WebKit::WebHistoryItem; @@ -274,14 +275,13 @@ bool BrowserWebViewDelegate::handleCurrentKeyboardEvent() { } bool BrowserWebViewDelegate::runFileChooser( - bool multi_select, const WebKit::WebString& title, - const WebKit::WebString& initial_value, + const WebFileChooserParams& params, WebKit::WebFileChooserCompletion* chooser_completion) { // Support file open dialog. std::vector file_names; - if(!ShowFileChooser(file_names, multi_select, title, - webkit_glue::WebStringToFilePath(initial_value))) { + if(!ShowFileChooser(file_names, params.multiSelect, params.title, + webkit_glue::WebStringToFilePath(params.initialValue))) { return false; } diff --git a/libcef/browser_webview_delegate.h b/libcef/browser_webview_delegate.h index 896bc18f0..435c7570c 100644 --- a/libcef/browser_webview_delegate.h +++ b/libcef/browser_webview_delegate.h @@ -22,6 +22,7 @@ #include "base/scoped_ptr.h" #include "base/weak_ptr.h" #include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h" +#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" @@ -73,8 +74,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient, virtual bool isSelectTrailingWhitespaceEnabled(); virtual bool handleCurrentKeyboardEvent(); virtual bool runFileChooser( - bool multi_select, const WebKit::WebString& title, - const WebKit::WebString& initial_value, + const WebKit::WebFileChooserParams& params, WebKit::WebFileChooserCompletion* chooser_completion); virtual void runModalAlertDialog( WebKit::WebFrame* frame, const WebKit::WebString& message);