OLD | NEW |
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 #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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 83 } |
84 | 84 |
85 Clipboard::Clipboard() { | 85 Clipboard::Clipboard() { |
86 DCHECK(CalledOnValidThread()); | 86 DCHECK(CalledOnValidThread()); |
87 } | 87 } |
88 | 88 |
89 Clipboard::~Clipboard() { | 89 Clipboard::~Clipboard() { |
90 DCHECK(CalledOnValidThread()); | 90 DCHECK(CalledOnValidThread()); |
91 } | 91 } |
92 | 92 |
93 void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) { | 93 void Clipboard::WriteObjectsImpl(Buffer buffer, const ObjectMap& objects) { |
94 DCHECK(CalledOnValidThread()); | 94 DCHECK(CalledOnValidThread()); |
95 DCHECK_EQ(buffer, BUFFER_STANDARD); | 95 DCHECK_EQ(buffer, BUFFER_STANDARD); |
96 | 96 |
97 NSPasteboard* pb = GetPasteboard(); | 97 NSPasteboard* pb = GetPasteboard(); |
98 [pb declareTypes:[NSArray array] owner:nil]; | 98 [pb declareTypes:[NSArray array] owner:nil]; |
99 | 99 |
100 for (ObjectMap::const_iterator iter = objects.begin(); | 100 for (ObjectMap::const_iterator iter = objects.begin(); |
101 iter != objects.end(); ++iter) { | 101 iter != objects.end(); ++iter) { |
102 DispatchObject(static_cast<ObjectType>(iter->first), iter->second); | 102 DispatchObject(static_cast<ObjectType>(iter->first), iter->second); |
103 } | 103 } |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 return type; | 479 return type; |
480 } | 480 } |
481 | 481 |
482 // static | 482 // static |
483 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { | 483 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { |
484 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kPepperCustomDataPboardType)); | 484 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kPepperCustomDataPboardType)); |
485 return type; | 485 return type; |
486 } | 486 } |
487 | 487 |
488 } // namespace ui | 488 } // namespace ui |
OLD | NEW |