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

Side by Side Diff: ash/common/system/tray/tray_item_more.cc

Issue 2661023006: Remove unused references to NativeTheme in TrayPopupItemStyle. (Closed)
Patch Set: slight improvement 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/tray_item_more.h" 5 #include "ash/common/system/tray/tray_item_more.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/system_tray_item.h" 8 #include "ash/common/system/tray/system_tray_item.h"
9 #include "ash/common/system/tray/tray_constants.h" 9 #include "ash/common/system/tray/tray_constants.h"
10 #include "ash/common/system/tray/tray_popup_item_style.h" 10 #include "ash/common/system/tray/tray_popup_item_style.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 icon_->SetImage(image_skia); 69 icon_->SetImage(image_skia);
70 SchedulePaint(); 70 SchedulePaint();
71 } 71 }
72 72
73 void TrayItemMore::SetAccessibleName(const base::string16& name) { 73 void TrayItemMore::SetAccessibleName(const base::string16& name) {
74 accessible_name_ = name; 74 accessible_name_ = name;
75 } 75 }
76 76
77 std::unique_ptr<TrayPopupItemStyle> TrayItemMore::CreateStyle() const { 77 std::unique_ptr<TrayPopupItemStyle> TrayItemMore::CreateStyle() const {
78 return base::MakeUnique<TrayPopupItemStyle>( 78 return base::MakeUnique<TrayPopupItemStyle>(
79 GetNativeTheme(), TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL); 79 TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL);
80 } 80 }
81 81
82 void TrayItemMore::UpdateStyle() { 82 void TrayItemMore::UpdateStyle() {
83 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) 83 if (!MaterialDesignController::IsSystemTrayMenuMaterial())
84 return; 84 return;
85 std::unique_ptr<TrayPopupItemStyle> style = CreateStyle(); 85 std::unique_ptr<TrayPopupItemStyle> style = CreateStyle();
86 style->SetupLabel(label_); 86 style->SetupLabel(label_);
87 87
88 if (more_) { 88 if (more_) {
89 more_->SetImage( 89 more_->SetImage(
(...skipping 14 matching lines...) Expand all
104 if (!accessible_name_.empty()) 104 if (!accessible_name_.empty())
105 node_data->SetName(accessible_name_); 105 node_data->SetName(accessible_name_);
106 } 106 }
107 107
108 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { 108 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) {
109 ActionableView::OnNativeThemeChanged(theme); 109 ActionableView::OnNativeThemeChanged(theme);
110 UpdateStyle(); 110 UpdateStyle();
111 } 111 }
112 112
113 } // namespace ash 113 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_details_view.cc ('k') | ash/common/system/tray/tray_popup_item_style.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698