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

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

Issue 720373003: Add FakeClipboard implementation for unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WINDOWS!!! Created 6 years, 1 month 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
« no previous file with comments | « ui/base/clipboard/clipboard_aura.h ('k') | ui/base/clipboard/clipboard_aurax11.h » ('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_aura.h" 5 #include "ui/base/clipboard/clipboard_aura.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 DCHECK(CalledOnValidThread()); 521 DCHECK(CalledOnValidThread());
522 // Make sure clipboard is created. 522 // Make sure clipboard is created.
523 GetClipboard(); 523 GetClipboard();
524 } 524 }
525 525
526 ClipboardAura::~ClipboardAura() { 526 ClipboardAura::~ClipboardAura() {
527 DCHECK(CalledOnValidThread()); 527 DCHECK(CalledOnValidThread());
528 DeleteClipboard(); 528 DeleteClipboard();
529 } 529 }
530 530
531 uint64 ClipboardAura::GetSequenceNumber(ClipboardType type) { 531 uint64 ClipboardAura::GetSequenceNumber(ClipboardType type) const {
532 DCHECK(CalledOnValidThread()); 532 DCHECK(CalledOnValidThread());
533 return GetClipboard()->sequence_number(); 533 return GetClipboard()->sequence_number();
534 } 534 }
535 535
536 bool ClipboardAura::IsFormatAvailable(const FormatType& format, 536 bool ClipboardAura::IsFormatAvailable(const FormatType& format,
537 ClipboardType type) const { 537 ClipboardType type) const {
538 DCHECK(CalledOnValidThread()); 538 DCHECK(CalledOnValidThread());
539 DCHECK(IsSupportedClipboardType(type)); 539 DCHECK(IsSupportedClipboardType(type));
540 AuraClipboard* clipboard = GetClipboard(); 540 AuraClipboard* clipboard = GetClipboard();
541 if (GetPlainTextFormatType().Equals(format) || 541 if (GetPlainTextFormatType().Equals(format) ||
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 ClipboardDataBuilder::WriteBitmap(bitmap); 680 ClipboardDataBuilder::WriteBitmap(bitmap);
681 } 681 }
682 682
683 void ClipboardAura::WriteData(const FormatType& format, 683 void ClipboardAura::WriteData(const FormatType& format,
684 const char* data_data, 684 const char* data_data,
685 size_t data_len) { 685 size_t data_len) {
686 ClipboardDataBuilder::WriteData(format.ToString(), data_data, data_len); 686 ClipboardDataBuilder::WriteData(format.ToString(), data_data, data_len);
687 } 687 }
688 688
689 } // namespace ui 689 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_aura.h ('k') | ui/base/clipboard/clipboard_aurax11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698