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

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

Issue 2228183002: Updates to icons for Ash material design system tray (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const ref Created 4 years, 4 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } // namespace 71 } // namespace
72 72
73 namespace tray { 73 namespace tray {
74 74
75 class DefaultAccessibilityView : public TrayItemMore { 75 class DefaultAccessibilityView : public TrayItemMore {
76 public: 76 public:
77 explicit DefaultAccessibilityView(SystemTrayItem* owner) 77 explicit DefaultAccessibilityView(SystemTrayItem* owner)
78 : TrayItemMore(owner, true) { 78 : TrayItemMore(owner, true) {
79 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 79 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
80 if (MaterialDesignController::UseMaterialDesignSystemIcons()) { 80 if (MaterialDesignController::UseMaterialDesignSystemIcons()) {
81 gfx::ImageSkia image_md = 81 SetImage(gfx::CreateVectorIcon(
82 CreateVectorIcon(gfx::VectorIconId::SYSTEM_MENU_ACCESSIBILITY, 82 gfx::VectorIconId::SYSTEM_MENU_ACCESSIBILITY, kMenuIconColor));
83 kMenuIconSize, kMenuIconColor);
84 SetImage(&image_md);
85 } else { 83 } else {
86 SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK) 84 SetImage(*bundle.GetImageNamed(IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK)
87 .ToImageSkia()); 85 .ToImageSkia());
88 } 86 }
89 base::string16 label = 87 base::string16 label =
90 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_ACCESSIBILITY); 88 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_ACCESSIBILITY);
91 SetLabel(label); 89 SetLabel(label);
92 SetAccessibleName(label); 90 SetAccessibleName(label);
93 set_id(test::kAccessibilityTrayItemViewId); 91 set_id(test::kAccessibilityTrayItemViewId);
94 } 92 }
95 93
96 ~DefaultAccessibilityView() override {} 94 ~DefaultAccessibilityView() override {}
97 95
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 if (detailed_popup_) 417 if (detailed_popup_)
420 detailed_popup_->GetWidget()->Close(); 418 detailed_popup_->GetWidget()->Close();
421 if (detailed_menu_) 419 if (detailed_menu_)
422 detailed_menu_->GetWidget()->Close(); 420 detailed_menu_->GetWidget()->Close();
423 } 421 }
424 422
425 previous_accessibility_state_ = accessibility_state; 423 previous_accessibility_state_ = accessibility_state;
426 } 424 }
427 425
428 } // namespace ash 426 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_notification_view.cc ('k') | ash/system/chromeos/rotation/tray_rotation_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698