OLD | NEW |
---|---|
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 Loading... | |
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_ |
OLD | NEW |