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

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

Issue 12041078: Clear the clipboard closing Incognito window (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with master Created 7 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
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 #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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698