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

Side by Side Diff: ash/common/system/tray/tray_notification_view.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
« no previous file with comments | « ash/common/system/tray/tray_item_more.cc ('k') | ash/common/system/tray_accessibility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_notification_view.h" 5 #include "ash/common/system/tray/tray_notification_view.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 "grit/ash_resources.h" 10 #include "grit/ash_resources.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 views::ImageButton* close_button = new views::ImageButton(this); 58 views::ImageButton* close_button = new views::ImageButton(this);
59 close_button->SetImage( 59 close_button->SetImage(
60 views::CustomButton::STATE_NORMAL, 60 views::CustomButton::STATE_NORMAL,
61 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(IDR_MESSAGE_CLOSE)); 61 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(IDR_MESSAGE_CLOSE));
62 close_button->SetImageAlignment(views::ImageButton::ALIGN_CENTER, 62 close_button->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
63 views::ImageButton::ALIGN_MIDDLE); 63 views::ImageButton::ALIGN_MIDDLE);
64 64
65 icon_ = new views::ImageView; 65 icon_ = new views::ImageView;
66 if (icon_id_ != 0) { 66 if (icon_id_ != 0) {
67 if (MaterialDesignController::UseMaterialDesignSystemIcons()) { 67 if (MaterialDesignController::UseMaterialDesignSystemIcons()) {
68 icon_->SetImage(CreateVectorIcon(ResourceIdToVectorIconId(icon_id_), 68 icon_->SetImage(gfx::CreateVectorIcon(ResourceIdToVectorIconId(icon_id_),
69 kMenuIconSize, kMenuIconColor)); 69 kMenuIconColor));
70 } else { 70 } else {
71 icon_->SetImage( 71 icon_->SetImage(
72 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(icon_id_)); 72 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(icon_id_));
73 } 73 }
74 } 74 }
75 75
76 views::ColumnSet* columns = layout->AddColumnSet(0); 76 views::ColumnSet* columns = layout->AddColumnSet(0);
77 77
78 columns->AddPaddingColumn(0, kTrayPopupPaddingHorizontal / 2); 78 columns->AddPaddingColumn(0, kTrayPopupPaddingHorizontal / 2);
79 79
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 OnClose(); 166 OnClose();
167 owner_->HideNotificationView(); 167 owner_->HideNotificationView();
168 } 168 }
169 169
170 void TrayNotificationView::HandleClickAction() { 170 void TrayNotificationView::HandleClickAction() {
171 HandleClose(); 171 HandleClose();
172 OnClickAction(); 172 OnClickAction();
173 } 173 }
174 174
175 } // namespace ash 175 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_item_more.cc ('k') | ash/common/system/tray_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698