| 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 #include "ash/system/chromeos/network/tray_sms.h" | 5 #include "ash/system/chromeos/network/tray_sms.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/fixed_sized_scroll_view.h" | 8 #include "ash/system/tray/fixed_sized_scroll_view.h" |
| 9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
| 10 #include "ash/system/tray/system_tray_bubble.h" | 10 #include "ash/system/tray/system_tray_bubble.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 if (!message->GetStringWithoutPathExpansion(kSmsNumberKey, number)) | 46 if (!message->GetStringWithoutPathExpansion(kSmsNumberKey, number)) |
| 47 return false; | 47 return false; |
| 48 if (!message->GetStringWithoutPathExpansion(kSmsTextKey, text)) | 48 if (!message->GetStringWithoutPathExpansion(kSmsTextKey, text)) |
| 49 return false; | 49 return false; |
| 50 return true; | 50 return true; |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace | 53 } // namespace |
| 54 | 54 |
| 55 namespace ash { | 55 namespace ash { |
| 56 namespace internal { | |
| 57 | 56 |
| 58 class TraySms::SmsDefaultView : public TrayItemMore { | 57 class TraySms::SmsDefaultView : public TrayItemMore { |
| 59 public: | 58 public: |
| 60 explicit SmsDefaultView(TraySms* owner) | 59 explicit SmsDefaultView(TraySms* owner) |
| 61 : TrayItemMore(owner, true) { | 60 : TrayItemMore(owner, true) { |
| 62 SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 61 SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| 63 IDR_AURA_UBER_TRAY_SMS)); | 62 IDR_AURA_UBER_TRAY_SMS)); |
| 64 Update(); | 63 Update(); |
| 65 } | 64 } |
| 66 | 65 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 size_t index; | 409 size_t index; |
| 411 std::string number, text; | 410 std::string number, text; |
| 412 if (GetLatestMessage(&index, &number, &text)) | 411 if (GetLatestMessage(&index, &number, &text)) |
| 413 notification_->Update(index, number, text); | 412 notification_->Update(index, number, text); |
| 414 } else if (notify) { | 413 } else if (notify) { |
| 415 ShowNotificationView(); | 414 ShowNotificationView(); |
| 416 } | 415 } |
| 417 } | 416 } |
| 418 } | 417 } |
| 419 | 418 |
| 420 } // namespace internal | |
| 421 } // namespace ash | 419 } // namespace ash |
| OLD | NEW |