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

Side by Side Diff: ash/system/chromeos/screen_security/screen_share_tray_item.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 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
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
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
OLDNEW
« no previous file with comments | « ash/system/chromeos/screen_security/screen_capture_tray_item.cc ('k') | ash/system/chromeos/session/logout_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698