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

Unified Diff: content/browser/web_contents/web_drag_dest_win.cc

Issue 18281002: Move WebDropData to content::DropData and split off conversion function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build error. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_drag_dest_win.cc
diff --git a/content/browser/web_contents/web_drag_dest_win.cc b/content/browser/web_contents/web_drag_dest_win.cc
index 1aadc95e62ab689707e2978d03ebd690384e09c0..af0e7246de2e1345738d53929fd072ccf1da139d 100644
--- a/content/browser/web_contents/web_drag_dest_win.cc
+++ b/content/browser/web_contents/web_drag_dest_win.cc
@@ -13,6 +13,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_drag_dest_delegate.h"
+#include "content/public/common/drop_data.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -21,7 +22,6 @@
#include "ui/base/dragdrop/os_exchange_data_provider_win.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/point.h"
-#include "webkit/common/webdropdata.h"
using WebKit::WebDragOperationNone;
using WebKit::WebDragOperationCopy;
@@ -60,9 +60,9 @@ int GetModifierFlags() {
return modifier_state;
}
-// Helper method for converting Window's specific IDataObject to a WebDropData
+// Helper method for converting Window's specific IDataObject to a DropData
// object.
-void PopulateWebDropData(IDataObject* data_object, WebDropData* drop_data) {
+void PopulateDropData(IDataObject* data_object, DropData* drop_data) {
base::string16 url_str;
if (ui::ClipboardUtil::GetUrl(
data_object, &url_str, &drop_data->url_title, false)) {
@@ -74,7 +74,7 @@ void PopulateWebDropData(IDataObject* data_object, WebDropData* drop_data) {
ui::ClipboardUtil::GetFilenames(data_object, &filenames);
for (size_t i = 0; i < filenames.size(); ++i)
drop_data->filenames.push_back(
- WebDropData::FileInfo(filenames[i], base::string16()));
+ DropData::FileInfo(filenames[i], base::string16()));
base::string16 text;
ui::ClipboardUtil::GetPlainText(data_object, &text);
if (!text.empty()) {
@@ -154,11 +154,11 @@ DWORD WebDragDest::OnDragEnter(IDataObject* data_object,
DWORD effects) {
current_rvh_ = web_contents_->GetRenderViewHost();
- // TODO(tc): PopulateWebDropData can be slow depending on what is in the
+ // TODO(tc): PopulateDropData can be slow depending on what is in the
// IDataObject. Maybe we can do this in a background thread.
- scoped_ptr<WebDropData> drop_data;
- drop_data.reset(new WebDropData());
- PopulateWebDropData(data_object, drop_data.get());
+ scoped_ptr<DropData> drop_data;
+ drop_data.reset(new DropData());
+ PopulateDropData(data_object, drop_data.get());
if (drop_data->url.is_empty())
ui::OSExchangeDataProviderWin::GetPlainTextURL(data_object,
« no previous file with comments | « content/browser/web_contents/web_drag_dest_win.h ('k') | content/browser/web_contents/web_drag_source_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698