Chromium Code Reviews| 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> |
|
James Cook
2017/02/10 17:36:38
not needed?
yiyix
2017/02/13 23:34:00
Done.
|
| +#include "ash/common/system/tray/system_tray_item.h" |
|
James Cook
2017/02/10 17:36:38
not needed?
yiyix
2017/02/13 23:34:00
Done.
|
| +#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_; |
|
James Cook
2017/02/10 17:36:38
nit: initialize in header (in general, if all memb
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(SmsObserver); |
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_SMS_OBSERVER_H_ |