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/chromeos/screen_security/screen_share_tray_item.h" | 5 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/system/system_notifier.h" | 10 #include "ash/system/system_notifier.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 helper_name_); | 60 helper_name_); |
61 } else { | 61 } else { |
62 help_label_text = l10n_util::GetStringUTF16( | 62 help_label_text = l10n_util::GetStringUTF16( |
63 IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED); | 63 IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED); |
64 } | 64 } |
65 | 65 |
66 message_center::RichNotificationData data; | 66 message_center::RichNotificationData data; |
67 data.buttons.push_back(message_center::ButtonInfo( | 67 data.buttons.push_back(message_center::ButtonInfo( |
68 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP))); | 68 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP))); |
69 ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance(); | 69 ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance(); |
70 scoped_ptr<Notification> notification(new Notification( | 70 std::unique_ptr<Notification> notification(new Notification( |
71 message_center::NOTIFICATION_TYPE_SIMPLE, kScreenShareNotificationId, | 71 message_center::NOTIFICATION_TYPE_SIMPLE, kScreenShareNotificationId, |
72 help_label_text, base::string16() /* body is blank */, | 72 help_label_text, base::string16() /* body is blank */, |
73 resource_bundle.GetImageNamed(IDR_AURA_UBER_TRAY_SCREENSHARE_DARK), | 73 resource_bundle.GetImageNamed(IDR_AURA_UBER_TRAY_SCREENSHARE_DARK), |
74 base::string16() /* display_source */, GURL(), | 74 base::string16() /* display_source */, GURL(), |
75 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, | 75 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
76 system_notifier::kNotifierScreenShare), | 76 system_notifier::kNotifierScreenShare), |
77 data, new tray::ScreenNotificationDelegate(this))); | 77 data, new tray::ScreenNotificationDelegate(this))); |
78 notification->SetSystemPriority(); | 78 notification->SetSystemPriority(); |
79 message_center::MessageCenter::Get()->AddNotification( | 79 message_center::MessageCenter::Get()->AddNotification( |
80 std::move(notification)); | 80 std::move(notification)); |
(...skipping 11 matching lines...) Expand all Loading... |
92 } | 92 } |
93 | 93 |
94 void ScreenShareTrayItem::OnScreenShareStop() { | 94 void ScreenShareTrayItem::OnScreenShareStop() { |
95 // We do not need to run the stop callback | 95 // We do not need to run the stop callback |
96 // when screening is stopped externally. | 96 // when screening is stopped externally. |
97 set_is_started(false); | 97 set_is_started(false); |
98 Update(); | 98 Update(); |
99 } | 99 } |
100 | 100 |
101 } // namespace ash | 101 } // namespace ash |
OLD | NEW |