OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H_ |
6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 25 matching lines...) Expand all Loading... |
36 protected: | 36 protected: |
37 class SmsDefaultView; | 37 class SmsDefaultView; |
38 class SmsDetailedView; | 38 class SmsDetailedView; |
39 class SmsMessageView; | 39 class SmsMessageView; |
40 class SmsNotificationView; | 40 class SmsNotificationView; |
41 | 41 |
42 // Gets the most recent message. Returns false if no messages or unable to | 42 // Gets the most recent message. Returns false if no messages or unable to |
43 // retrieve the numebr and text from the message. | 43 // retrieve the numebr and text from the message. |
44 bool GetLatestMessage(size_t* index, std::string* number, std::string* text); | 44 bool GetLatestMessage(size_t* index, std::string* number, std::string* text); |
45 | 45 |
46 // Removes message at |index| from message list. | 46 // Removes message at |index| from message list. Returns true if |index| was |
47 void RemoveMessage(size_t index); | 47 // valid and a message was removed. |
| 48 bool RemoveMessage(size_t index); |
48 | 49 |
49 // Called when sms messages have changed (through | 50 // Called when sms messages have changed (through |
50 // chromeos::NetworkSmsHandler::Observer). | 51 // chromeos::NetworkSmsHandler::Observer). |
51 void Update(bool notify); | 52 void Update(bool notify); |
52 | 53 |
53 base::ListValue& messages() { return messages_; } | 54 base::ListValue& messages() { return messages_; } |
54 | 55 |
55 private: | 56 private: |
56 SmsDefaultView* default_; | 57 SmsDefaultView* default_; |
57 SmsDetailedView* detailed_; | 58 SmsDetailedView* detailed_; |
58 SmsNotificationView* notification_; | 59 SmsNotificationView* notification_; |
59 base::ListValue messages_; | 60 base::ListValue messages_; |
60 | 61 |
61 DISALLOW_COPY_AND_ASSIGN(TraySms); | 62 DISALLOW_COPY_AND_ASSIGN(TraySms); |
62 }; | 63 }; |
63 | 64 |
64 } // namespace ash | 65 } // namespace ash |
65 | 66 |
66 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H_ | 67 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H_ |
OLD | NEW |