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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_observer_android.h

Issue 1485743002: Push API: test that default notification is shown on Android when needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PushMessagingInstrumentationTest
Patch Set: Address peter's comments. Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/push_messaging/push_messaging_service_observer_android.h
diff --git a/chrome/browser/push_messaging/push_messaging_service_observer_android.h b/chrome/browser/push_messaging/push_messaging_service_observer_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..25c5038a58d7950ac0925e5ce94ed4f419813ef5
--- /dev/null
+++ b/chrome/browser/push_messaging/push_messaging_service_observer_android.h
@@ -0,0 +1,31 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID_H_
+#define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID_H_
+
+#include "chrome/browser/push_messaging/push_messaging_service_observer.h"
+
+#include <jni.h>
+
+#include "base/macros.h"
+
+// Observer for the PushMessagingService to be used on Android for forwarding
+// message handled events to listeners in Java.
+class PushMessagingServiceObserverAndroid
+ : public PushMessagingServiceObserver {
+ public:
+ static bool RegisterJni(JNIEnv* env);
+
+ // PushMessagingServiceObserver implementation.
+ void OnMessageHandled() override;
+
+ private:
+ friend class PushMessagingServiceObserver;
Bernhard Bauer 2015/12/11 12:28:42 You could add a protected empty constructor to the
Michael van Ouwerkerk 2015/12/11 16:05:56 I'm not sure what you meant by this actually. How
+ PushMessagingServiceObserverAndroid() {}
+
+ DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceObserverAndroid);
+};
+
+#endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_OBSERVER_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698