| 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 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/android/context_utils.h" | 10 #include "base/android/context_utils.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 return ScopedJavaLocalRef<jobjectArray>(env, array); | 55 return ScopedJavaLocalRef<jobjectArray>(env, array); |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace | 58 } // namespace |
| 59 | 59 |
| 60 // Called by the Java side when a notification event has been received, but the | 60 // Called by the Java side when a notification event has been received, but the |
| 61 // NotificationUIManager has not been initialized yet. Enforce initialization of | 61 // NotificationUIManager has not been initialized yet. Enforce initialization of |
| 62 // the class. | 62 // the class. |
| 63 static void InitializeNotificationUIManager(JNIEnv* env, | 63 static void InitializeNotificationUIManager(JNIEnv* env, |
| 64 const JavaParamRef<jclass>& clazz) { | 64 const JavaParamRef<jclass>& clazz) { |
| 65 g_browser_process->notification_ui_manager(); | 65 g_browser_process->notification_platform_bridge(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 // static | 68 // static |
| 69 NotificationPlatformBridge* NotificationPlatformBridge::Create() { | 69 NotificationPlatformBridge* NotificationPlatformBridge::Create() { |
| 70 return new NotificationUIManagerAndroid(); | 70 return new NotificationUIManagerAndroid(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 NotificationUIManagerAndroid::NotificationUIManagerAndroid() { | 73 NotificationUIManagerAndroid::NotificationUIManagerAndroid() { |
| 74 java_object_.Reset( | 74 java_object_.Reset( |
| 75 Java_NotificationUIManager_create( | 75 Java_NotificationUIManager_create( |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 } | 234 } |
| 235 | 235 |
| 236 bool NotificationUIManagerAndroid::SupportsNotificationCenter() const { | 236 bool NotificationUIManagerAndroid::SupportsNotificationCenter() const { |
| 237 return true; | 237 return true; |
| 238 } | 238 } |
| 239 | 239 |
| 240 bool NotificationUIManagerAndroid::RegisterNotificationPlatformBridge( | 240 bool NotificationUIManagerAndroid::RegisterNotificationPlatformBridge( |
| 241 JNIEnv* env) { | 241 JNIEnv* env) { |
| 242 return RegisterNativesImpl(env); | 242 return RegisterNativesImpl(env); |
| 243 } | 243 } |
| OLD | NEW |