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

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

Issue 6625075: Add stubs and glue for routing a request for an image from the clipboard. (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
225 void Clipboard::ReadBookmark(string16* title, std::string* url) const { 233 void Clipboard::ReadBookmark(string16* title, std::string* url) const {
226 NSPasteboard* pb = GetPasteboard(); 234 NSPasteboard* pb = GetPasteboard();
227 235
228 if (title) { 236 if (title) {
229 NSString* contents = [pb stringForType:kUTTypeURLName]; 237 NSString* contents = [pb stringForType:kUTTypeURLName];
230 UTF8ToUTF16([contents UTF8String], 238 UTF8ToUTF16([contents UTF8String],
231 [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding], 239 [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding],
232 title); 240 title);
233 } 241 }
234 242
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 332 }
325 333
326 // static 334 // static
327 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() { 335 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() {
328 static const std::string type = 336 static const std::string type =
329 base::SysNSStringToUTF8(kWebSmartPastePboardType); 337 base::SysNSStringToUTF8(kWebSmartPastePboardType);
330 return type; 338 return type;
331 } 339 }
332 340
333 } // namespace ui 341 } // 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