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 class ClipboardAndroid : public Clipboard { |
21 public: | 24 public: |
25 // Exported only so | |
26 // chrome/browser/android/preferences/browser_prefs_android.cc | |
27 // can call it. | |
28 static UI_BASE_EXPORT void RegisterPrefs(PrefRegistrySimple* registry); | |
Ted C
2017/04/24 20:45:48
I would have expected static to come after the UI_
Mark P
2017/04/24 22:19:56
Acknowledged. Swapped the order simply because th
| |
29 | |
30 // Called during startup when local state is available to store a pointer to | |
31 // local_state in order to read and update prefs. | |
32 UI_BASE_EXPORT void SetLocalState(PrefService* local_state); | |
Ted C
2017/04/24 20:45:48
local state is not something that is super easy to
Mark P
2017/04/24 22:19:56
I understand SetPrefService seems clearer and prob
dcheng
2017/04/25 13:17:12
PrefService does seem profile-specific to me, whil
Mark P
2017/04/25 18:51:21
Left function name as-is as previously discussed.
| |
33 | |
22 // Called by Java when the Java Clipboard is notified that the clipboard has | 34 // Called by Java when the Java Clipboard is notified that the clipboard has |
23 // changed. | 35 // changed. |
24 void OnPrimaryClipChanged(JNIEnv* env, | 36 void OnPrimaryClipChanged(JNIEnv* env, |
25 const base::android::JavaParamRef<jobject>& obj); | 37 const base::android::JavaParamRef<jobject>& obj); |
26 | 38 |
27 private: | 39 private: |
28 friend class Clipboard; | 40 friend class Clipboard; |
29 | 41 |
30 ClipboardAndroid(); | 42 ClipboardAndroid(); |
31 ~ClipboardAndroid() override; | 43 ~ClipboardAndroid() override; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 | 86 |
75 DISALLOW_COPY_AND_ASSIGN(ClipboardAndroid); | 87 DISALLOW_COPY_AND_ASSIGN(ClipboardAndroid); |
76 }; | 88 }; |
77 | 89 |
78 // Registers the ClipboardAndroid native method. | 90 // Registers the ClipboardAndroid native method. |
79 bool RegisterClipboardAndroid(JNIEnv* env); | 91 bool RegisterClipboardAndroid(JNIEnv* env); |
80 | 92 |
81 } // namespace ui | 93 } // namespace ui |
82 | 94 |
83 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_ | 95 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_ |
OLD | NEW |