Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/notifications/notification_ui_manager_android.cc

Issue 1919223002: Initialize the notification bridge instead of the UIManager on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698