| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/system/screen_security/screen_tray_item.h" | 5 #include "ash/system/screen_security/screen_tray_item.h" |
| 6 | 6 |
| 7 #include "ash/resources/vector_icons/vector_icons.h" | 7 #include "ash/resources/vector_icons/vector_icons.h" |
| 8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "ash/system/tray/tray_popup_item_style.h" | 10 #include "ash/system/tray/tray_popup_item_style.h" |
| 11 #include "ash/system/tray/tray_popup_utils.h" | 11 #include "ash/system/tray/tray_popup_utils.h" |
| 12 #include "components/vector_icons/vector_icons.h" |
| 12 #include "ui/gfx/paint_vector_icon.h" | 13 #include "ui/gfx/paint_vector_icon.h" |
| 13 #include "ui/message_center/message_center.h" | 14 #include "ui/message_center/message_center.h" |
| 14 #include "ui/views/controls/button/label_button.h" | 15 #include "ui/views/controls/button/label_button.h" |
| 15 #include "ui/views/controls/image_view.h" | 16 #include "ui/views/controls/image_view.h" |
| 16 #include "ui/views/controls/label.h" | 17 #include "ui/views/controls/label.h" |
| 17 #include "ui/views/layout/fill_layout.h" | 18 #include "ui/views/layout/fill_layout.h" |
| 18 | 19 |
| 19 namespace ash { | 20 namespace ash { |
| 20 namespace tray { | 21 namespace tray { |
| 21 | 22 |
| 22 // ScreenTrayView implementations. | 23 // ScreenTrayView implementations. |
| 23 ScreenTrayView::ScreenTrayView(ScreenTrayItem* screen_tray_item) | 24 ScreenTrayView::ScreenTrayView(ScreenTrayItem* screen_tray_item) |
| 24 : TrayItemView(screen_tray_item), screen_tray_item_(screen_tray_item) { | 25 : TrayItemView(screen_tray_item), screen_tray_item_(screen_tray_item) { |
| 25 CreateImageView(); | 26 CreateImageView(); |
| 26 image_view()->SetImage( | 27 image_view()->SetImage( |
| 27 gfx::CreateVectorIcon(kSystemTrayScreenShareIcon, kTrayIconColor)); | 28 gfx::CreateVectorIcon(vector_icons::kScreenShareIcon, kTrayIconColor)); |
| 28 Update(); | 29 Update(); |
| 29 } | 30 } |
| 30 | 31 |
| 31 ScreenTrayView::~ScreenTrayView() {} | 32 ScreenTrayView::~ScreenTrayView() {} |
| 32 | 33 |
| 33 void ScreenTrayView::Update() { | 34 void ScreenTrayView::Update() { |
| 34 SetVisible(screen_tray_item_->is_started()); | 35 SetVisible(screen_tray_item_->is_started()); |
| 35 } | 36 } |
| 36 | 37 |
| 37 // ScreenStatusView implementations. | 38 // ScreenStatusView implementations. |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 166 |
| 166 void ScreenTrayItem::DestroyTrayView() { | 167 void ScreenTrayItem::DestroyTrayView() { |
| 167 tray_view_ = nullptr; | 168 tray_view_ = nullptr; |
| 168 } | 169 } |
| 169 | 170 |
| 170 void ScreenTrayItem::DestroyDefaultView() { | 171 void ScreenTrayItem::DestroyDefaultView() { |
| 171 default_view_ = nullptr; | 172 default_view_ = nullptr; |
| 172 } | 173 } |
| 173 | 174 |
| 174 } // namespace ash | 175 } // namespace ash |
| OLD | NEW |