Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: ash/common/system/chromeos/tray_caps_lock.cc

Issue 2457393006: [ash-md] Added ink drop to system menu rows that inherit from ActionableView. (Closed)
Patch Set: Fixed the failing test: 'SpokenFeedbackTest.NavigateSystemTray' Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/tray/actionable_view.h" 8 #include "ash/common/system/tray/actionable_view.h"
9 #include "ash/common/system/tray/fixed_sized_image_view.h" 9 #include "ash/common/system/tray/fixed_sized_image_view.h"
10 #include "ash/common/system/tray/system_tray_delegate.h" 10 #include "ash/common/system/tray/system_tray_delegate.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 image->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_CAPS_LOCK_DARK) 57 image->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_CAPS_LOCK_DARK)
58 .ToImageSkia()); 58 .ToImageSkia());
59 } 59 }
60 AddChildView(image); 60 AddChildView(image);
61 61
62 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 62 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
63 AddChildView(text_label_); 63 AddChildView(text_label_);
64 64
65 shortcut_label_->SetEnabled(false); 65 shortcut_label_->SetEnabled(false);
66 AddChildView(shortcut_label_); 66 AddChildView(shortcut_label_);
67
68 if (MaterialDesignController::IsSystemTrayMenuMaterial())
69 SetInkDropMode(InkDropHostView::InkDropMode::ON);
67 } 70 }
68 71
69 ~CapsLockDefaultView() override {} 72 ~CapsLockDefaultView() override {}
70 73
71 // Updates the label text and the shortcut text. 74 // Updates the label text and the shortcut text.
72 void Update(bool caps_lock_enabled) { 75 void Update(bool caps_lock_enabled) {
73 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 76 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
74 const int text_string_id = caps_lock_enabled 77 const int text_string_id = caps_lock_enabled
75 ? IDS_ASH_STATUS_TRAY_CAPS_LOCK_ENABLED 78 ? IDS_ASH_STATUS_TRAY_CAPS_LOCK_ENABLED
76 : IDS_ASH_STATUS_TRAY_CAPS_LOCK_DISABLED; 79 : IDS_ASH_STATUS_TRAY_CAPS_LOCK_DISABLED;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 227
225 void TrayCapsLock::DestroyDefaultView() { 228 void TrayCapsLock::DestroyDefaultView() {
226 default_ = NULL; 229 default_ = NULL;
227 } 230 }
228 231
229 void TrayCapsLock::DestroyDetailedView() { 232 void TrayCapsLock::DestroyDetailedView() {
230 detailed_ = NULL; 233 detailed_ = NULL;
231 } 234 }
232 235
233 } // namespace ash 236 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/settings/tray_settings.cc ('k') | ash/common/system/chromeos/tray_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698