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

Side by Side Diff: ui/base/clipboard/clipboard_android.h

Issue 720373003: Add FakeClipboard implementation for unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more fix... 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
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_CLIPBOARD_CLIPBOARD_ANDROID_H_ 5 #ifndef UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_
6 #define UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_ 6 #define UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_
7 7
8 #include "ui/base/clipboard/clipboard.h" 8 #include "ui/base/clipboard/clipboard.h"
9 9
10 #include <jni.h> 10 #include <jni.h>
11 11
12 namespace ui { 12 namespace ui {
13 13
14 bool RegisterClipboardAndroid(JNIEnv* env); 14 bool RegisterClipboardAndroid(JNIEnv* env);
15 15
16 class ClipboardAndroid : public Clipboard { 16 class ClipboardAndroid : public Clipboard {
17 private: 17 private:
18 friend class Clipboard; 18 friend class Clipboard;
19 19
20 ClipboardAndroid(); 20 ClipboardAndroid();
21 ~ClipboardAndroid() override; 21 ~ClipboardAndroid() override;
22 22
23 // Clipboard overrides: 23 // Clipboard overrides:
24 uint64 GetSequenceNumber(ClipboardType type) override; 24 uint64 GetSequenceNumber(ClipboardType type) const override;
25 bool IsFormatAvailable(const FormatType& format, 25 bool IsFormatAvailable(const FormatType& format,
26 ClipboardType type) const override; 26 ClipboardType type) const override;
27 void Clear(ClipboardType type) override; 27 void Clear(ClipboardType type) override;
28 void ReadAvailableTypes(ClipboardType type, 28 void ReadAvailableTypes(ClipboardType type,
29 std::vector<base::string16>* types, 29 std::vector<base::string16>* types,
30 bool* contains_filenames) const override; 30 bool* contains_filenames) const override;
31 void ReadText(ClipboardType type, base::string16* result) const override; 31 void ReadText(ClipboardType type, base::string16* result) const override;
32 void ReadAsciiText(ClipboardType type, std::string* result) const override; 32 void ReadAsciiText(ClipboardType type, std::string* result) const override;
33 void ReadHTML(ClipboardType type, 33 void ReadHTML(ClipboardType type,
34 base::string16* markup, 34 base::string16* markup,
(...skipping 23 matching lines...) Expand all
58 void WriteData(const FormatType& format, 58 void WriteData(const FormatType& format,
59 const char* data_data, 59 const char* data_data,
60 size_t data_len) override; 60 size_t data_len) override;
61 61
62 DISALLOW_COPY_AND_ASSIGN(ClipboardAndroid); 62 DISALLOW_COPY_AND_ASSIGN(ClipboardAndroid);
63 }; 63 };
64 64
65 } // namespace ui 65 } // namespace ui
66 66
67 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_ 67 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698