From 2d04fb5283f7ce8a55810e26582372d396d16fa8 Mon Sep 17 00:00:00 2001 From: "dcheng@chromium.org" Date: Tue, 5 Oct 2010 03:14:12 +0000 Subject: Update Chrome to use the renamed WebDragData methods. BUG=none TEST=none Review URL: http://codereview.chromium.org/3526017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61472 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/webplugin_delegate_proxy.cc | 4 ++-- webkit/glue/webdropdata.cc | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 7bf368e..e469338 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -1142,7 +1142,7 @@ void WebPluginDelegateProxy::OnShowModalHTMLDialog( static void EncodeDragData(const WebDragData& data, bool add_data, NPVariant* drag_type, NPVariant* drag_data) { const NPString* np_drag_type; - if (data.hasFileNames()) { + if (data.containsFilenames()) { static const NPString kFiles = { "Files", 5 }; np_drag_type = &kFiles; } else { @@ -1160,7 +1160,7 @@ static void EncodeDragData(const WebDragData& data, bool add_data, } WebVector files; - data.fileNames(files); + data.filenames(files); static std::string utf8; utf8.clear(); diff --git a/webkit/glue/webdropdata.cc b/webkit/glue/webdropdata.cc index ea9e6c6..cda887d 100644 --- a/webkit/glue/webdropdata.cc +++ b/webkit/glue/webdropdata.cc @@ -28,12 +28,12 @@ WebDropData::WebDropData(const WebDragData& drag_data) plain_text(drag_data.plainText()), text_html(drag_data.htmlText()), html_base_url(drag_data.htmlBaseURL()), - file_description_filename(drag_data.fileContentFileName()) { - if (drag_data.hasFileNames()) { - WebVector fileNames; - drag_data.fileNames(fileNames); - for (size_t i = 0; i < fileNames.size(); ++i) - filenames.push_back(fileNames[i]); + file_description_filename(drag_data.fileContentFilename()) { + if (drag_data.containsFilenames()) { + WebVector filenames_copy; + drag_data.filenames(filenames_copy); + for (size_t i = 0; i < filenames_copy.size(); ++i) + filenames.push_back(filenames_copy[i]); } WebData contents = drag_data.fileContent(); if (!contents.isEmpty()) @@ -53,11 +53,11 @@ WebDragData WebDropData::ToDragData() const { result.setURL(url); result.setURLTitle(url_title); result.setFileExtension(file_extension); - result.setFileNames(filenames); + result.setFilenames(filenames); result.setPlainText(plain_text); result.setHTMLText(text_html); result.setHTMLBaseURL(html_base_url); - result.setFileContentFileName(file_description_filename); + result.setFileContentFilename(file_description_filename); result.setFileContent(WebData(file_contents.data(), file_contents.size())); return result; } -- cgit v1.1