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_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 #include <stddef.h> | 11 #include <stddef.h> |
12 #include <stdint.h> | 12 #include <stdint.h> |
13 | 13 |
14 #include "base/android/scoped_java_ref.h" | 14 #include "base/android/scoped_java_ref.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 | 17 |
18 class PrefService; | |
19 class PrefRegistrySimple; | |
20 | |
18 namespace ui { | 21 namespace ui { |
19 | 22 |
20 class ClipboardAndroid : public Clipboard { | 23 // Exported only so chrome/browser/android/preferences/browser_prefs_android.cc |
24 // can call RegisterPrefs(). | |
25 class UI_BASE_EXPORT ClipboardAndroid : public Clipboard { | |
21 public: | 26 public: |
27 static void RegisterPrefs(PrefRegistrySimple* registry); | |
dcheng
2017/04/22 01:43:01
Could just export this one helper too.
Mark P
2017/04/24 17:33:26
Ah, I didn't know I could export individual functi
| |
28 | |
29 // Called during startup when local state is available to store a pointer to | |
30 // local_state in order to read and update prefs. | |
31 void SetLocalState(PrefService* local_state); | |
32 | |
22 // Called by Java when the Java Clipboard is notified that the clipboard has | 33 // Called by Java when the Java Clipboard is notified that the clipboard has |
23 // changed. | 34 // changed. |
24 void OnPrimaryClipChanged(JNIEnv* env, | 35 void OnPrimaryClipChanged(JNIEnv* env, |
25 const base::android::JavaParamRef<jobject>& obj); | 36 const base::android::JavaParamRef<jobject>& obj); |
26 | 37 |
27 private: | 38 private: |
28 friend class Clipboard; | 39 friend class Clipboard; |
29 | 40 |
30 ClipboardAndroid(); | 41 ClipboardAndroid(); |
31 ~ClipboardAndroid() override; | 42 ~ClipboardAndroid() override; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 | 85 |
75 DISALLOW_COPY_AND_ASSIGN(ClipboardAndroid); | 86 DISALLOW_COPY_AND_ASSIGN(ClipboardAndroid); |
76 }; | 87 }; |
77 | 88 |
78 // Registers the ClipboardAndroid native method. | 89 // Registers the ClipboardAndroid native method. |
79 bool RegisterClipboardAndroid(JNIEnv* env); | 90 bool RegisterClipboardAndroid(JNIEnv* env); |
80 | 91 |
81 } // namespace ui | 92 } // namespace ui |
82 | 93 |
83 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_ | 94 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_ |
OLD | NEW |