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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_service_observer_android.h

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID_H_ 5 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID_H_
6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID_H_ 6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID_H_
7 7
8 #include "chrome/browser/push_messaging/push_messaging_service_observer.h" 8 #include "chrome/browser/push_messaging/push_messaging_service_observer.h"
9 9
10 #include <jni.h> 10 #include <jni.h>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 13
14 // Observer for the PushMessagingService to be used on Android for forwarding 14 // Observer for the PushMessagingService to be used on Android for forwarding
15 // message handled events to listeners in Java. 15 // message handled events to listeners in Java.
16 class PushMessagingServiceObserverAndroid 16 class PushMessagingServiceObserverAndroid
17 : public PushMessagingServiceObserver { 17 : public PushMessagingServiceObserver {
18 public: 18 public:
19 static bool RegisterJni(JNIEnv* env);
20
21 // PushMessagingServiceObserver implementation. 19 // PushMessagingServiceObserver implementation.
22 void OnMessageHandled() override; 20 void OnMessageHandled() override;
23 21
24 private: 22 private:
25 friend class PushMessagingServiceObserver; 23 friend class PushMessagingServiceObserver;
26 PushMessagingServiceObserverAndroid() {} 24 PushMessagingServiceObserverAndroid() {}
27 25
28 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceObserverAndroid); 26 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceObserverAndroid);
29 }; 27 };
30 28
31 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID _H_ 29 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698