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

Side by Side Diff: ash/common/system/tray_accessibility.cc

Issue 2699443004: Modify TrayItemMore to use enabled status (Closed)
Patch Set: Removed non-MD Created 3 years, 10 months 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/tray_accessibility.h" 5 #include "ash/common/system/tray_accessibility.h"
6 6
7 #include "ash/common/accessibility_delegate.h" 7 #include "ash/common/accessibility_delegate.h"
8 #include "ash/common/accessibility_types.h" 8 #include "ash/common/accessibility_types.h"
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return WmShell::Get()->system_tray_delegate()->GetUserLoginStatus(); 78 return WmShell::Get()->system_tray_delegate()->GetUserLoginStatus();
79 } 79 }
80 80
81 } // namespace 81 } // namespace
82 82
83 namespace tray { 83 namespace tray {
84 84
85 class DefaultAccessibilityView : public TrayItemMore { 85 class DefaultAccessibilityView : public TrayItemMore {
86 public: 86 public:
87 explicit DefaultAccessibilityView(SystemTrayItem* owner) 87 explicit DefaultAccessibilityView(SystemTrayItem* owner)
88 : TrayItemMore(owner, true) { 88 : TrayItemMore(owner) {
89 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 89 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
90 if (!MaterialDesignController::UseMaterialDesignSystemIcons()) { 90 if (!MaterialDesignController::UseMaterialDesignSystemIcons()) {
91 // The icon doesn't change in non-md. 91 // The icon doesn't change in non-md.
92 SetImage(*bundle.GetImageNamed(IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK) 92 SetImage(*bundle.GetImageNamed(IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK)
93 .ToImageSkia()); 93 .ToImageSkia());
94 } 94 }
95 base::string16 label = 95 base::string16 label =
96 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_ACCESSIBILITY); 96 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_ACCESSIBILITY);
97 SetLabel(label); 97 SetLabel(label);
98 SetAccessibleName(label); 98 SetAccessibleName(label);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 if (detailed_popup_) 464 if (detailed_popup_)
465 detailed_popup_->GetWidget()->Close(); 465 detailed_popup_->GetWidget()->Close();
466 if (detailed_menu_) 466 if (detailed_menu_)
467 detailed_menu_->GetWidget()->Close(); 467 detailed_menu_->GetWidget()->Close();
468 } 468 }
469 469
470 previous_accessibility_state_ = accessibility_state; 470 previous_accessibility_state_ = accessibility_state;
471 } 471 }
472 472
473 } // namespace ash 473 } // namespace ash
OLDNEW
« ash/common/system/tray/tray_item_more.cc ('K') | « ash/common/system/tray/tray_item_more.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698