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

Side by Side Diff: ui/base/clipboard/clipboard_aurax11.cc

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
« no previous file with comments | « ui/base/clipboard/clipboard.h ('k') | ui/base/clipboard/clipboard_gtk.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) 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 #include "ui/base/clipboard/clipboard.h" 5 #include "ui/base/clipboard/clipboard.h"
6 6
7 #include <list> 7 #include <list>
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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 Clipboard::Clipboard() { 418 Clipboard::Clipboard() {
419 // Make sure clipboard is created. 419 // Make sure clipboard is created.
420 GetClipboard(); 420 GetClipboard();
421 } 421 }
422 422
423 Clipboard::~Clipboard() { 423 Clipboard::~Clipboard() {
424 DeleteClipboard(); 424 DeleteClipboard();
425 } 425 }
426 426
427 void Clipboard::WriteObjects(const ObjectMap& objects) { 427 void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
428 DCHECK(IsValidBuffer(buffer));
428 for (ObjectMap::const_iterator iter = objects.begin(); 429 for (ObjectMap::const_iterator iter = objects.begin();
429 iter != objects.end(); ++iter) { 430 iter != objects.end(); ++iter) {
430 DispatchObject(static_cast<ObjectType>(iter->first), iter->second); 431 DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
431 } 432 }
432 ClipboardDataBuilder::CommitToClipboard(); 433 ClipboardDataBuilder::CommitToClipboard();
433 } 434 }
434 435
435 bool Clipboard::IsFormatAvailable(const FormatType& format, 436 bool Clipboard::IsFormatAvailable(const FormatType& format,
436 Buffer buffer) const { 437 Buffer buffer) const {
437 DCHECK(IsValidBuffer(buffer)); 438 DCHECK(IsValidBuffer(buffer));
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 return type; 592 return type;
592 } 593 }
593 594
594 // static 595 // static
595 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { 596 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() {
596 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData)); 597 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData));
597 return type; 598 return type;
598 } 599 }
599 600
600 } // namespace ui 601 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard.h ('k') | ui/base/clipboard/clipboard_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698