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

Unified Diff: ash/common/system/chromeos/network/sms_observer.h

Issue 2583393002: Send notification to users upon receiving sms messages (Closed)
Patch Set: update return type Created 3 years, 10 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
« no previous file with comments | « ash/common/shelf/shelf_widget.cc ('k') | ash/common/system/chromeos/network/sms_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/network/sms_observer.h
diff --git a/ash/common/system/chromeos/network/sms_observer.h b/ash/common/system/chromeos/network/sms_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..f8069586d9ff51bef2f561b40c28a55beb04f801
--- /dev/null
+++ b/ash/common/system/chromeos/network/sms_observer.h
@@ -0,0 +1,37 @@
+// Copyright 2017 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 ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_SMS_OBSERVER_H_
+#define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_SMS_OBSERVER_H_
+
+#include <stddef.h>
+
+#include <string>
+#include "ash/common/system/tray/system_tray_item.h"
+#include "base/macros.h"
+#include "base/values.h"
+#include "chromeos/network/network_sms_handler.h"
+
+namespace ash {
+
+// SmsObserver is called when a new sms message is received. Then it shows the
+// sms message to the user in the notification center.
+class SmsObserver : public chromeos::NetworkSmsHandler::Observer {
+ public:
+ SmsObserver();
+ ~SmsObserver() override;
+
+ // chromeos::NetworkSmsHandler::Observer:
+ void MessageReceived(const base::DictionaryValue& message) override;
+
+ private:
+ // Used to create notification identifier.
+ uint32_t message_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(SmsObserver);
+};
+
+} // namespace ash
+
+#endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_SMS_OBSERVER_H_
« no previous file with comments | « ash/common/shelf/shelf_widget.cc ('k') | ash/common/system/chromeos/network/sms_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698