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 #include "chrome/browser/notifications/notification_ui_manager_android.h" | 5 #include "chrome/browser/notifications/notification_ui_manager_android.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/android/jni_array.h" | 9 #include "base/android/jni_array.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
23 | 23 |
24 using base::android::AttachCurrentThread; | 24 using base::android::AttachCurrentThread; |
25 using base::android::ConvertJavaStringToUTF8; | 25 using base::android::ConvertJavaStringToUTF8; |
26 using base::android::ConvertUTF16ToJavaString; | 26 using base::android::ConvertUTF16ToJavaString; |
27 using base::android::ConvertUTF8ToJavaString; | 27 using base::android::ConvertUTF8ToJavaString; |
28 | 28 |
29 // Called by the Java side when a notification event has been received, but the | 29 // Called by the Java side when a notification event has been received, but the |
30 // NotificationUIManager has not been initialized yet. Enforce initialization of | 30 // NotificationUIManager has not been initialized yet. Enforce initialization of |
31 // the class. | 31 // the class. |
32 static void InitializeNotificationUIManager(JNIEnv* env, jclass clazz) { | 32 static void InitializeNotificationUIManager(JNIEnv* env, |
| 33 const JavaParamRef<jclass>& clazz) { |
33 g_browser_process->notification_ui_manager(); | 34 g_browser_process->notification_ui_manager(); |
34 } | 35 } |
35 | 36 |
36 // static | 37 // static |
37 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { | 38 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { |
38 return new NotificationUIManagerAndroid(); | 39 return new NotificationUIManagerAndroid(); |
39 } | 40 } |
40 | 41 |
41 NotificationUIManagerAndroid::NotificationUIManagerAndroid() { | 42 NotificationUIManagerAndroid::NotificationUIManagerAndroid() { |
42 java_object_.Reset( | 43 java_object_.Reset( |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 return false; | 224 return false; |
224 } | 225 } |
225 | 226 |
226 void NotificationUIManagerAndroid::CancelAll() { | 227 void NotificationUIManagerAndroid::CancelAll() { |
227 NOTREACHED(); | 228 NOTREACHED(); |
228 } | 229 } |
229 | 230 |
230 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { | 231 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { |
231 return RegisterNativesImpl(env); | 232 return RegisterNativesImpl(env); |
232 } | 233 } |
OLD | NEW |