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

Side by Side Diff: content/browser/web_contents/web_drag_source_mac.mm

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "content/browser/web_contents/web_drag_source_mac.h" 5 #import "content/browser/web_contents/web_drag_source_mac.h"
6 6
7 #include <sys/param.h> 7 #include <sys/param.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 forType:base::mac::CFToNSCast(fileUTI_.get())]; 193 forType:base::mac::CFToNSCast(fileUTI_.get())];
194 194
195 // Plain text. 195 // Plain text.
196 } else if ([type isEqualToString:NSStringPboardType]) { 196 } else if ([type isEqualToString:NSStringPboardType]) {
197 DCHECK(!dropData_->text.string().empty()); 197 DCHECK(!dropData_->text.string().empty());
198 [pboard setString:SysUTF16ToNSString(dropData_->text.string()) 198 [pboard setString:SysUTF16ToNSString(dropData_->text.string())
199 forType:NSStringPboardType]; 199 forType:NSStringPboardType];
200 200
201 // Custom MIME data. 201 // Custom MIME data.
202 } else if ([type isEqualToString:ui::kWebCustomDataPboardType]) { 202 } else if ([type isEqualToString:ui::kWebCustomDataPboardType]) {
203 Pickle pickle; 203 base::Pickle pickle;
204 ui::WriteCustomDataToPickle(dropData_->custom_data, &pickle); 204 ui::WriteCustomDataToPickle(dropData_->custom_data, &pickle);
205 [pboard setData:[NSData dataWithBytes:pickle.data() length:pickle.size()] 205 [pboard setData:[NSData dataWithBytes:pickle.data() length:pickle.size()]
206 forType:ui::kWebCustomDataPboardType]; 206 forType:ui::kWebCustomDataPboardType];
207 207
208 // Dummy type. 208 // Dummy type.
209 } else if ([type isEqualToString:ui::kChromeDragDummyPboardType]) { 209 } else if ([type isEqualToString:ui::kChromeDragDummyPboardType]) {
210 // The dummy type _was_ promised and someone decided to call the bluff. 210 // The dummy type _was_ promised and someone decided to call the bluff.
211 [pboard setData:[NSData data] 211 [pboard setData:[NSData data]
212 forType:ui::kChromeDragDummyPboardType]; 212 forType:ui::kChromeDragDummyPboardType];
213 213
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 - (NSImage*)dragImage { 457 - (NSImage*)dragImage {
458 if (dragImage_) 458 if (dragImage_)
459 return dragImage_; 459 return dragImage_;
460 460
461 // Default to returning a generic image. 461 // Default to returning a generic image.
462 return content::GetContentClient()->GetNativeImageNamed( 462 return content::GetContentClient()->GetNativeImageNamed(
463 IDR_DEFAULT_FAVICON).ToNSImage(); 463 IDR_DEFAULT_FAVICON).ToNSImage();
464 } 464 }
465 465
466 @end // @implementation WebDragSource (Private) 466 @end // @implementation WebDragSource (Private)
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/browser/zygote_host/zygote_host_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698