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

Unified Diff: base/clipboard_mac.mm

Issue 174367: Change the ChromiumPasteboard to have a notion of an alternate clipboard... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « base/clipboard_linux.cc ('k') | base/clipboard_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/clipboard_mac.mm
===================================================================
--- base/clipboard_mac.mm (revision 25640)
+++ base/clipboard_mac.mm (working copy)
@@ -135,7 +135,9 @@
[pb setData:nil forType:format];
}
-bool Clipboard::IsFormatAvailable(const Clipboard::FormatType& format) const {
+bool Clipboard::IsFormatAvailable(const Clipboard::FormatType& format,
+ Clipboard::Buffer buffer) const {
+ DCHECK_EQ(buffer, BUFFER_STANDARD);
NSString* format_ns = base::SysUTF8ToNSString(format);
NSPasteboard* pb = GetPasteboard();
@@ -144,7 +146,8 @@
return [types containsObject:format_ns];
}
-void Clipboard::ReadText(string16* result) const {
+void Clipboard::ReadText(Clipboard::Buffer buffer, string16* result) const {
+ DCHECK_EQ(buffer, BUFFER_STANDARD);
NSPasteboard* pb = GetPasteboard();
NSString* contents = [pb stringForType:NSStringPboardType];
@@ -153,7 +156,9 @@
result);
}
-void Clipboard::ReadAsciiText(std::string* result) const {
+void Clipboard::ReadAsciiText(Clipboard::Buffer buffer,
+ std::string* result) const {
+ DCHECK_EQ(buffer, BUFFER_STANDARD);
NSPasteboard* pb = GetPasteboard();
NSString* contents = [pb stringForType:NSStringPboardType];
@@ -163,7 +168,9 @@
result->assign([contents UTF8String]);
}
-void Clipboard::ReadHTML(string16* markup, std::string* src_url) const {
+void Clipboard::ReadHTML(Clipboard::Buffer buffer, string16* markup,
+ std::string* src_url) const {
+ DCHECK_EQ(buffer, BUFFER_STANDARD);
if (markup) {
NSPasteboard* pb = GetPasteboard();
NSArray *supportedTypes = [NSArray arrayWithObjects:NSHTMLPboardType,
« no previous file with comments | « base/clipboard_linux.cc ('k') | base/clipboard_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698