| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |