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

Unified Diff: components/gcm/gcm_driver_android.h

Issue 278493002: Split GCMDriver into platform-specific implementations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/gcm/gcm_driver_android.h
diff --git a/components/gcm/gcm_driver_android.h b/components/gcm/gcm_driver_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9e6a93567cc22c60b9d31c9bd02124700dfa15e
--- /dev/null
+++ b/components/gcm/gcm_driver_android.h
@@ -0,0 +1,45 @@
+// Copyright 2014 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 COMPONENTS_GCM_GCM_DRIVER_ANDROID_H_
+#define COMPONENTS_GCM_GCM_DRIVER_ANDROID_H_
+
+#include "components/gcm/gcm_driver.h"
+
+namespace gcm {
+
+// GCMDriver implementation for Android.
+class GCMDriverAndroid : public GCMDriver {
+ public:
+ GCMDriverAndroid(const scoped_refptr<base::MessageLoopProxy>& ui_thread);
+ virtual ~GCMDriverAndroid();
+
+ // GCMDriver implementation.
+ virtual void Enable() OVERRIDE;
+ virtual void Disable() OVERRIDE;
+ virtual void Register(const std::string& app_id,
+ const std::vector<std::string>& sender_ids,
+ const RegisterCallback& callback) OVERRIDE;
+ virtual void Unregister(const std::string& app_id,
+ const UnregisterCallback& callback) OVERRIDE;
+ virtual void Send(const std::string& app_id,
+ const std::string& receiver_id,
+ const GCMClient::OutgoingMessage& message,
+ const SendCallback& callback) OVERRIDE;
+ virtual GCMClient* GetGCMClientForTesting() const OVERRIDE;
+ virtual bool IsStarted() const OVERRIDE;
+ virtual bool IsGCMClientReady() const OVERRIDE;
+ virtual std::string SignedInUserName() const OVERRIDE;
+ virtual void GetGCMStatistics(GetGCMStatisticsCallback callback,
+ bool clear_logs) OVERRIDE;
+ virtual void SetGCMRecording(GetGCMStatisticsCallback callback,
+ bool recording) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid);
+};
+
+} // namespace gcm
+
+#endif // COMPONENTS_GCM_GCM_DRIVER_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698