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/context_utils.h" | 9 #include "base/android/context_utils.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 static void InitializeNotificationUIManager(JNIEnv* env, | 60 static void InitializeNotificationUIManager(JNIEnv* env, |
61 const JavaParamRef<jclass>& clazz) { | 61 const JavaParamRef<jclass>& clazz) { |
62 g_browser_process->notification_ui_manager(); | 62 g_browser_process->notification_ui_manager(); |
63 } | 63 } |
64 | 64 |
65 // static | 65 // static |
66 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { | 66 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { |
67 return new NotificationUIManagerAndroid(); | 67 return new NotificationUIManagerAndroid(); |
68 } | 68 } |
69 | 69 |
| 70 // static |
| 71 NotificationUIManager* |
| 72 NotificationUIManager::CreateNativeNotificationManager() { |
| 73 return nullptr; |
| 74 } |
| 75 |
70 NotificationUIManagerAndroid::NotificationUIManagerAndroid() { | 76 NotificationUIManagerAndroid::NotificationUIManagerAndroid() { |
71 java_object_.Reset( | 77 java_object_.Reset( |
72 Java_NotificationUIManager_create( | 78 Java_NotificationUIManager_create( |
73 AttachCurrentThread(), | 79 AttachCurrentThread(), |
74 reinterpret_cast<intptr_t>(this), | 80 reinterpret_cast<intptr_t>(this), |
75 base::android::GetApplicationContext())); | 81 base::android::GetApplicationContext())); |
76 } | 82 } |
77 | 83 |
78 NotificationUIManagerAndroid::~NotificationUIManagerAndroid() { | 84 NotificationUIManagerAndroid::~NotificationUIManagerAndroid() { |
79 Java_NotificationUIManager_destroy(AttachCurrentThread(), | 85 Java_NotificationUIManager_destroy(AttachCurrentThread(), |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 return false; | 271 return false; |
266 } | 272 } |
267 | 273 |
268 void NotificationUIManagerAndroid::CancelAll() { | 274 void NotificationUIManagerAndroid::CancelAll() { |
269 NOTREACHED(); | 275 NOTREACHED(); |
270 } | 276 } |
271 | 277 |
272 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { | 278 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { |
273 return RegisterNativesImpl(env); | 279 return RegisterNativesImpl(env); |
274 } | 280 } |
OLD | NEW |