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

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

Issue 9232075: Have ScopedClipboardWriter and Clipboard::WriteObjects take a buffer parameter. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix build error Created 8 years, 10 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
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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const std::string& serialization) { 77 const std::string& serialization) {
78 return FormatType(base::SysUTF8ToNSString(serialization)); 78 return FormatType(base::SysUTF8ToNSString(serialization));
79 } 79 }
80 80
81 Clipboard::Clipboard() { 81 Clipboard::Clipboard() {
82 } 82 }
83 83
84 Clipboard::~Clipboard() { 84 Clipboard::~Clipboard() {
85 } 85 }
86 86
87 void Clipboard::WriteObjects(const ObjectMap& objects) { 87 void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
88 DCHECK_EQ(buffer, BUFFER_STANDARD);
89
88 NSPasteboard* pb = GetPasteboard(); 90 NSPasteboard* pb = GetPasteboard();
89 [pb declareTypes:[NSArray array] owner:nil]; 91 [pb declareTypes:[NSArray array] owner:nil];
90 92
91 for (ObjectMap::const_iterator iter = objects.begin(); 93 for (ObjectMap::const_iterator iter = objects.begin();
92 iter != objects.end(); ++iter) { 94 iter != objects.end(); ++iter) {
93 DispatchObject(static_cast<ObjectType>(iter->first), iter->second); 95 DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
94 } 96 }
95 } 97 }
96 98
97 void Clipboard::WriteText(const char* text_data, size_t text_len) { 99 void Clipboard::WriteText(const char* text_data, size_t text_len) {
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 return type; 461 return type;
460 } 462 }
461 463
462 // static 464 // static
463 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { 465 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() {
464 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kWebCustomDataPboardType)); 466 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kWebCustomDataPboardType));
465 return type; 467 return type;
466 } 468 }
467 469
468 } // namespace ui 470 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698