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

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

Issue 2690543003: Send notification to users upon receiving sms messages (Closed)
Patch Set: fix nits 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/ash_chromeos_strings.grdp ('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..72a2e0cbcca2c66212828d513678186425dd5430
--- /dev/null
+++ b/ash/common/system/chromeos/network/sms_observer.h
@@ -0,0 +1,35 @@
+// 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 "chromeos/network/network_sms_handler.h"
+
+namespace base {
+class DictionaryValue;
+}
+
+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_ = 0;
+
+ DISALLOW_COPY_AND_ASSIGN(SmsObserver);
+};
+
+} // namespace ash
+
+#endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_SMS_OBSERVER_H_
« no previous file with comments | « ash/ash_chromeos_strings.grdp ('k') | ash/common/system/chromeos/network/sms_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698