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/tray_caps_lock.h" | 5 #include "ash/common/system/chromeos/tray_caps_lock.h" |
6 | 6 |
7 #include "ash/common/accessibility_delegate.h" | 7 #include "ash/common/accessibility_delegate.h" |
8 #include "ash/common/strings/grit/ash_strings.h" | 8 #include "ash/common/strings/grit/ash_strings.h" |
9 #include "ash/common/system/tray/actionable_view.h" | 9 #include "ash/common/system/tray/actionable_view.h" |
10 #include "ash/common/system/tray/system_tray_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 CapsLockDefaultView() | 50 CapsLockDefaultView() |
51 : ActionableView(nullptr, TrayPopupInkDropStyle::FILL_BOUNDS), | 51 : ActionableView(nullptr, TrayPopupInkDropStyle::FILL_BOUNDS), |
52 text_label_(TrayPopupUtils::CreateDefaultLabel()), | 52 text_label_(TrayPopupUtils::CreateDefaultLabel()), |
53 shortcut_label_(TrayPopupUtils::CreateDefaultLabel()) { | 53 shortcut_label_(TrayPopupUtils::CreateDefaultLabel()) { |
54 shortcut_label_->SetEnabled(false); | 54 shortcut_label_->SetEnabled(false); |
55 | 55 |
56 TriView* tri_view(TrayPopupUtils::CreateDefaultRowView()); | 56 TriView* tri_view(TrayPopupUtils::CreateDefaultRowView()); |
57 SetLayoutManager(new views::FillLayout); | 57 SetLayoutManager(new views::FillLayout); |
58 AddChildView(tri_view); | 58 AddChildView(tri_view); |
59 | 59 |
60 auto image = TrayPopupUtils::CreateMainImageView(); | 60 auto* image = TrayPopupUtils::CreateMainImageView(); |
61 image->SetEnabled(enabled()); | 61 image->SetEnabled(enabled()); |
62 TrayPopupItemStyle default_view_style( | 62 TrayPopupItemStyle default_view_style( |
63 TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL); | 63 TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL); |
64 image->SetImage(gfx::CreateVectorIcon(kSystemMenuCapsLockIcon, | 64 image->SetImage(gfx::CreateVectorIcon(kSystemMenuCapsLockIcon, |
65 default_view_style.GetIconColor())); | 65 default_view_style.GetIconColor())); |
66 default_view_style.SetupLabel(text_label_); | 66 default_view_style.SetupLabel(text_label_); |
67 | 67 |
68 TrayPopupItemStyle caption_style(TrayPopupItemStyle::FontStyle::CAPTION); | 68 TrayPopupItemStyle caption_style(TrayPopupItemStyle::FontStyle::CAPTION); |
69 caption_style.SetupLabel(shortcut_label_); | 69 caption_style.SetupLabel(shortcut_label_); |
70 | 70 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 void TrayCapsLock::DestroyDefaultView() { | 224 void TrayCapsLock::DestroyDefaultView() { |
225 default_ = nullptr; | 225 default_ = nullptr; |
226 } | 226 } |
227 | 227 |
228 void TrayCapsLock::DestroyDetailedView() { | 228 void TrayCapsLock::DestroyDetailedView() { |
229 detailed_ = nullptr; | 229 detailed_ = nullptr; |
230 } | 230 } |
231 | 231 |
232 } // namespace ash | 232 } // namespace ash |
OLD | NEW |