| 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/tray_update.h" | 5 #include "ash/system/tray_update.h" |
| 6 | 6 |
| 7 #include "ash/common/system/tray/fixed_sized_image_view.h" |
| 7 #include "ash/common/system/tray/system_tray_delegate.h" | 8 #include "ash/common/system/tray/system_tray_delegate.h" |
| 9 #include "ash/common/system/tray/tray_constants.h" |
| 8 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 9 #include "ash/system/tray/fixed_sized_image_view.h" | |
| 10 #include "ash/system/tray/system_tray.h" | 11 #include "ash/system/tray/system_tray.h" |
| 11 #include "ash/system/tray/system_tray_notifier.h" | 12 #include "ash/system/tray/system_tray_notifier.h" |
| 12 #include "ash/system/tray/tray_constants.h" | |
| 13 #include "grit/ash_resources.h" | 13 #include "grit/ash_resources.h" |
| 14 #include "grit/ash_strings.h" | 14 #include "grit/ash_strings.h" |
| 15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
| 17 #include "ui/gfx/image/image.h" | 17 #include "ui/gfx/image/image.h" |
| 18 #include "ui/views/controls/image_view.h" | 18 #include "ui/views/controls/image_view.h" |
| 19 #include "ui/views/controls/label.h" | 19 #include "ui/views/controls/label.h" |
| 20 #include "ui/views/layout/box_layout.h" | 20 #include "ui/views/layout/box_layout.h" |
| 21 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
| 22 | 22 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 Shell::GetInstance()->system_tray_delegate()->GetSystemUpdateInfo(&info); | 107 Shell::GetInstance()->system_tray_delegate()->GetSystemUpdateInfo(&info); |
| 108 return info.update_required ? new UpdateView(info) : nullptr; | 108 return info.update_required ? new UpdateView(info) : nullptr; |
| 109 } | 109 } |
| 110 | 110 |
| 111 void TrayUpdate::OnUpdateRecommended(const UpdateInfo& info) { | 111 void TrayUpdate::OnUpdateRecommended(const UpdateInfo& info) { |
| 112 SetImageFromResourceId(DecideResource(info.severity, false)); | 112 SetImageFromResourceId(DecideResource(info.severity, false)); |
| 113 tray_view()->SetVisible(true); | 113 tray_view()->SetVisible(true); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace ash | 116 } // namespace ash |
| OLD | NEW |