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

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: gfx namespace 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 gfx::ImageSkia image_md = gfx::CreateVectorIcon(
82 CreateVectorIcon(gfx::VectorIconId::SYSTEM_MENU_ACCESSIBILITY, 82 gfx::VectorIconId::SYSTEM_MENU_ACCESSIBILITY, kMenuIconColor);
83 kMenuIconSize, kMenuIconColor);
84 SetImage(&image_md); 83 SetImage(&image_md);
85 } else { 84 } else {
86 SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK) 85 SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK)
87 .ToImageSkia()); 86 .ToImageSkia());
88 } 87 }
89 base::string16 label = 88 base::string16 label =
90 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_ACCESSIBILITY); 89 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_ACCESSIBILITY);
91 SetLabel(label); 90 SetLabel(label);
92 SetAccessibleName(label); 91 SetAccessibleName(label);
93 set_id(test::kAccessibilityTrayItemViewId); 92 set_id(test::kAccessibilityTrayItemViewId);
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 if (detailed_popup_) 418 if (detailed_popup_)
420 detailed_popup_->GetWidget()->Close(); 419 detailed_popup_->GetWidget()->Close();
421 if (detailed_menu_) 420 if (detailed_menu_)
422 detailed_menu_->GetWidget()->Close(); 421 detailed_menu_->GetWidget()->Close();
423 } 422 }
424 423
425 previous_accessibility_state_ = accessibility_state; 424 previous_accessibility_state_ = accessibility_state;
426 } 425 }
427 426
428 } // namespace ash 427 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698