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

Side by Side Diff: ui/base/clipboard/clipboard_mac.mm

Issue 6698011: Revert r78134+r78136 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/clipboard/clipboard_linux.cc ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "ui/base/clipboard/clipboard.h" 5 #include "ui/base/clipboard/clipboard.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 UTF8ToUTF16([contents UTF8String], 215 UTF8ToUTF16([contents UTF8String],
216 [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding], 216 [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding],
217 markup); 217 markup);
218 } 218 }
219 219
220 // TODO(avi): src_url? 220 // TODO(avi): src_url?
221 if (src_url) 221 if (src_url)
222 src_url->clear(); 222 src_url->clear();
223 } 223 }
224 224
225 void Clipboard::ReadImage(Buffer buffer, std::string* data) const {
226 DCHECK_EQ(buffer, BUFFER_STANDARD);
227 if (!data) {
228 NOTREACHED();
229 return;
230 }
231 }
232
233 void Clipboard::ReadBookmark(string16* title, std::string* url) const { 225 void Clipboard::ReadBookmark(string16* title, std::string* url) const {
234 NSPasteboard* pb = GetPasteboard(); 226 NSPasteboard* pb = GetPasteboard();
235 227
236 if (title) { 228 if (title) {
237 NSString* contents = [pb stringForType:kUTTypeURLName]; 229 NSString* contents = [pb stringForType:kUTTypeURLName];
238 UTF8ToUTF16([contents UTF8String], 230 UTF8ToUTF16([contents UTF8String],
239 [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding], 231 [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding],
240 title); 232 title);
241 } 233 }
242 234
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 324 }
333 325
334 // static 326 // static
335 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() { 327 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() {
336 static const std::string type = 328 static const std::string type =
337 base::SysNSStringToUTF8(kWebSmartPastePboardType); 329 base::SysNSStringToUTF8(kWebSmartPastePboardType);
338 return type; 330 return type;
339 } 331 }
340 332
341 } // namespace ui 333 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_linux.cc ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698