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

Side by Side Diff: ui/base/test/test_clipboard.h

Issue 574273002: Rewrite clipboard write IPC handling to be easier to understand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test test clipboard awesomesauce 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/scoped_clipboard_writer.cc ('k') | ui/base/test/test_clipboard.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_BASE_TEST_TEST_CLIPBOARD_H_ 5 #ifndef UI_BASE_TEST_TEST_CLIPBOARD_H_
6 #define UI_BASE_TEST_TEST_CLIPBOARD_H_ 6 #define UI_BASE_TEST_TEST_CLIPBOARD_H_
7 7
8 #include <map> 8 #include <map>
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/base/clipboard/clipboard.h" 10 #include "ui/base/clipboard/clipboard.h"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 class TestClipboard : public Clipboard { 14 class TestClipboard : public Clipboard {
15 public: 15 public:
16 TestClipboard(); 16 TestClipboard();
17 ~TestClipboard() override; 17 ~TestClipboard() override;
18 18
19 static void UseForCurrentThread(); 19 static Clipboard* CreateForCurrentThread();
sky 2014/11/19 18:55:30 Document ownership.
dcheng 2014/11/19 20:39:02 Done.
20 20
21 // Clipboard overrides. 21 // Clipboard overrides.
22 uint64 GetSequenceNumber(ClipboardType type) const override; 22 uint64 GetSequenceNumber(ClipboardType type) const override;
23 bool IsFormatAvailable(const FormatType& format, 23 bool IsFormatAvailable(const FormatType& format,
24 ClipboardType type) const override; 24 ClipboardType type) const override;
25 void Clear(ClipboardType type) override; 25 void Clear(ClipboardType type) override;
26 void ReadAvailableTypes(ClipboardType type, 26 void ReadAvailableTypes(ClipboardType type,
27 std::vector<base::string16>* types, 27 std::vector<base::string16>* types,
28 bool* contains_filenames) const override; 28 bool* contains_filenames) const override;
29 void ReadText(ClipboardType type, base::string16* result) const override; 29 void ReadText(ClipboardType type, base::string16* result) const override;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 ClipboardType default_store_type_; 78 ClipboardType default_store_type_;
79 mutable std::map<ClipboardType, DataStore> stores_; 79 mutable std::map<ClipboardType, DataStore> stores_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(TestClipboard); 81 DISALLOW_COPY_AND_ASSIGN(TestClipboard);
82 }; 82 };
83 83
84 } // namespace ui 84 } // namespace ui
85 85
86 #endif // UI_BASE_TEST_TEST_CLIPBOARD_H_ 86 #endif // UI_BASE_TEST_TEST_CLIPBOARD_H_
OLDNEW
« no previous file with comments | « ui/base/clipboard/scoped_clipboard_writer.cc ('k') | ui/base/test/test_clipboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698