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

Unified Diff: content/browser/web_contents/web_drag_dest_mac.mm

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_mac.mm
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index 6e89318a9dba6485df96666ab89be7a08ec4b81e..8a529e838fd123670f660e174d3b4797cf4916c4 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -11,14 +11,15 @@
#include "content/browser/web_contents/web_contents_impl.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"
#import "third_party/mozilla/NSPasteboard+Utils.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/base/clipboard/custom_data_helper.h"
#import "ui/base/dragdrop/cocoa_dnd_util.h"
#include "ui/base/window_open_disposition.h"
-#include "webkit/common/webdropdata.h"
using WebKit::WebDragOperationsMask;
+using content::DropData;
using content::OpenURLParams;
using content::Referrer;
using content::WebContentsImpl;
@@ -50,7 +51,7 @@ int GetModifierFlags() {
return self;
}
-- (WebDropData*)currentDropData {
+- (DropData*)currentDropData {
return dropData_.get();
}
@@ -105,10 +106,10 @@ int GetModifierFlags() {
// we need to send a new enter message in draggingUpdated:.
currentRVH_ = webContents_->GetRenderViewHost();
- // Fill out a WebDropData from pasteboard.
- scoped_ptr<WebDropData> dropData;
- dropData.reset(new WebDropData());
- [self populateWebDropData:dropData.get()
+ // Fill out a DropData from pasteboard.
+ scoped_ptr<DropData> dropData;
+ dropData.reset(new DropData());
+ [self populateDropData:dropData.get()
fromPasteboard:[info draggingPasteboard]];
NSDragOperation mask = [info draggingSourceOperationMask];
@@ -246,8 +247,8 @@ int GetModifierFlags() {
// Given |data|, which should not be nil, fill it in using the contents of the
// given pasteboard. The types handled by this method should be kept in sync
// with [WebContentsViewCocoa registerDragTypes].
-- (void)populateWebDropData:(WebDropData*)data
- fromPasteboard:(NSPasteboard*)pboard {
+- (void)populateDropData:(DropData*)data
+ fromPasteboard:(NSPasteboard*)pboard {
DCHECK(data);
DCHECK(pboard);
NSArray* types = [pboard types];
@@ -288,7 +289,7 @@ int GetModifierFlags() {
fileExistsAtPath:filename];
if (exists) {
data->filenames.push_back(
- WebDropData::FileInfo(
+ DropData::FileInfo(
base::SysNSStringToUTF16(filename), string16()));
}
}
« no previous file with comments | « content/browser/web_contents/web_drag_dest_mac.h ('k') | content/browser/web_contents/web_drag_dest_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698