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

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

Issue 1551133002: Convert Pass()→std::move() in //ash (CrOS edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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_capture_tray_item.h" 5 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h"
6 6
7 #include <utility>
8
7 #include "ash/shell.h" 9 #include "ash/shell.h"
8 #include "ash/system/system_notifier.h" 10 #include "ash/system/system_notifier.h"
9 #include "grit/ash_resources.h" 11 #include "grit/ash_resources.h"
10 #include "grit/ash_strings.h" 12 #include "grit/ash_strings.h"
11 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
12 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/message_center/message_center.h" 15 #include "ui/message_center/message_center.h"
14 #include "ui/message_center/notification.h" 16 #include "ui/message_center/notification.h"
15 17
16 using message_center::Notification; 18 using message_center::Notification;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance(); 61 ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance();
60 scoped_ptr<Notification> notification(new Notification( 62 scoped_ptr<Notification> notification(new Notification(
61 message_center::NOTIFICATION_TYPE_SIMPLE, kScreenCaptureNotificationId, 63 message_center::NOTIFICATION_TYPE_SIMPLE, kScreenCaptureNotificationId,
62 screen_capture_status_, base::string16() /* body is blank */, 64 screen_capture_status_, base::string16() /* body is blank */,
63 resource_bundle.GetImageNamed(IDR_AURA_UBER_TRAY_SCREENSHARE_DARK), 65 resource_bundle.GetImageNamed(IDR_AURA_UBER_TRAY_SCREENSHARE_DARK),
64 base::string16() /* display_source */, GURL(), 66 base::string16() /* display_source */, GURL(),
65 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, 67 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
66 system_notifier::kNotifierScreenCapture), 68 system_notifier::kNotifierScreenCapture),
67 data, new tray::ScreenNotificationDelegate(this))); 69 data, new tray::ScreenNotificationDelegate(this)));
68 notification->SetSystemPriority(); 70 notification->SetSystemPriority();
69 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); 71 message_center::MessageCenter::Get()->AddNotification(
72 std::move(notification));
70 } 73 }
71 74
72 std::string ScreenCaptureTrayItem::GetNotificationId() { 75 std::string ScreenCaptureTrayItem::GetNotificationId() {
73 return kScreenCaptureNotificationId; 76 return kScreenCaptureNotificationId;
74 } 77 }
75 78
76 void ScreenCaptureTrayItem::OnScreenCaptureStart( 79 void ScreenCaptureTrayItem::OnScreenCaptureStart(
77 const base::Closure& stop_callback, 80 const base::Closure& stop_callback,
78 const base::string16& screen_capture_status) { 81 const base::string16& screen_capture_status) {
79 screen_capture_status_ = screen_capture_status; 82 screen_capture_status_ = screen_capture_status;
(...skipping 16 matching lines...) Expand all
96 // screen capture is stopped externally. 99 // screen capture is stopped externally.
97 set_is_started(false); 100 set_is_started(false);
98 Update(); 101 Update();
99 } 102 }
100 103
101 void ScreenCaptureTrayItem::OnCastingSessionStartedOrStopped(bool started) { 104 void ScreenCaptureTrayItem::OnCastingSessionStartedOrStopped(bool started) {
102 is_casting_ = started; 105 is_casting_ = started;
103 } 106 }
104 107
105 } // namespace ash 108 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/power/tray_power.cc ('k') | ash/system/chromeos/screen_security/screen_share_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698