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/common/system/chromeos/network/tray_sms.h" | 5 #include "ash/common/system/chromeos/network/tray_sms.h" |
6 | 6 |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/metrics/user_metrics_action.h" | 8 #include "ash/common/metrics/user_metrics_action.h" |
9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" | 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 } // namespace | 57 } // namespace |
58 | 58 |
59 namespace ash { | 59 namespace ash { |
60 | 60 |
61 class TraySms::SmsDefaultView : public TrayItemMore { | 61 class TraySms::SmsDefaultView : public TrayItemMore { |
62 public: | 62 public: |
63 explicit SmsDefaultView(TraySms* owner) : TrayItemMore(owner, true) { | 63 explicit SmsDefaultView(TraySms* owner) : TrayItemMore(owner, true) { |
64 if (MaterialDesignController::UseMaterialDesignSystemIcons()) { | 64 if (MaterialDesignController::UseMaterialDesignSystemIcons()) { |
65 gfx::ImageSkia image_md = CreateVectorIcon( | 65 SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::SYSTEM_MENU_SMS, |
66 gfx::VectorIconId::SYSTEM_MENU_SMS, kMenuIconSize, kMenuIconColor); | 66 kMenuIconSize, kMenuIconColor)); |
67 SetImage(&image_md); | |
68 } else { | 67 } else { |
69 SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 68 SetImage(*ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
70 IDR_AURA_UBER_TRAY_SMS)); | 69 IDR_AURA_UBER_TRAY_SMS)); |
71 } | 70 } |
72 Update(); | 71 Update(); |
73 } | 72 } |
74 | 73 |
75 ~SmsDefaultView() override {} | 74 ~SmsDefaultView() override {} |
76 | 75 |
77 void Update() { | 76 void Update() { |
78 int message_count = static_cast<TraySms*>(owner())->messages().GetSize(); | 77 int message_count = static_cast<TraySms*>(owner())->messages().GetSize(); |
79 // TODO(jshin): Currently, a tabular format is used ("SMS Messages: | 78 // TODO(jshin): Currently, a tabular format is used ("SMS Messages: |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 std::string number, text; | 424 std::string number, text; |
426 if (GetLatestMessage(&index, &number, &text)) | 425 if (GetLatestMessage(&index, &number, &text)) |
427 notification_->Update(index, number, text); | 426 notification_->Update(index, number, text); |
428 } else if (notify) { | 427 } else if (notify) { |
429 ShowNotificationView(); | 428 ShowNotificationView(); |
430 } | 429 } |
431 } | 430 } |
432 } | 431 } |
433 | 432 |
434 } // namespace ash | 433 } // namespace ash |
OLD | NEW |