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/update/tray_update.h" | 5 #include "ash/common/system/update/tray_update.h" |
6 | 6 |
7 #include "ash/common/metrics/user_metrics_action.h" | 7 #include "ash/common/metrics/user_metrics_action.h" |
8 #include "ash/common/system/tray/fixed_sized_image_view.h" | 8 #include "ash/common/system/tray/fixed_sized_image_view.h" |
| 9 #include "ash/common/system/tray/system_tray.h" |
9 #include "ash/common/system/tray/system_tray_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
10 #include "ash/common/system/tray/system_tray_notifier.h" | 11 #include "ash/common/system/tray/system_tray_notifier.h" |
11 #include "ash/common/system/tray/tray_constants.h" | 12 #include "ash/common/system/tray/tray_constants.h" |
12 #include "ash/common/wm_shell.h" | 13 #include "ash/common/wm_shell.h" |
13 #include "ash/system/tray/system_tray.h" | |
14 #include "grit/ash_resources.h" | 14 #include "grit/ash_resources.h" |
15 #include "grit/ash_strings.h" | 15 #include "grit/ash_strings.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 | 21 |
22 namespace ash { | 22 namespace ash { |
23 namespace { | 23 namespace { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 WmShell::Get()->system_tray_delegate()->GetSystemUpdateInfo(&info); | 105 WmShell::Get()->system_tray_delegate()->GetSystemUpdateInfo(&info); |
106 return info.update_required ? new UpdateView(info) : nullptr; | 106 return info.update_required ? new UpdateView(info) : nullptr; |
107 } | 107 } |
108 | 108 |
109 void TrayUpdate::OnUpdateRecommended(const UpdateInfo& info) { | 109 void TrayUpdate::OnUpdateRecommended(const UpdateInfo& info) { |
110 SetImageFromResourceId(DecideResource(info.severity, false)); | 110 SetImageFromResourceId(DecideResource(info.severity, false)); |
111 tray_view()->SetVisible(true); | 111 tray_view()->SetVisible(true); |
112 } | 112 } |
113 | 113 |
114 } // namespace ash | 114 } // namespace ash |
OLD | NEW |