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

Side by Side Diff: ash/display/resolution_notification_controller.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/display/resolution_notification_controller.h" 5 #include "ash/display/resolution_notification_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/display/display_info.h" 9 #include "ash/display/display_info.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED, 220 IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED,
221 display_name, 221 display_name,
222 base::UTF8ToUTF16(change_info_->new_resolution.size.ToString())) : 222 base::UTF8ToUTF16(change_info_->new_resolution.size.ToString())) :
223 l10n_util::GetStringFUTF16( 223 l10n_util::GetStringFUTF16(
224 IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED_TO_UNSUPPORTED, 224 IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED_TO_UNSUPPORTED,
225 display_name, 225 display_name,
226 base::UTF8ToUTF16(change_info_->new_resolution.size.ToString()), 226 base::UTF8ToUTF16(change_info_->new_resolution.size.ToString()),
227 base::UTF8ToUTF16(change_info_->current_resolution.size.ToString())); 227 base::UTF8ToUTF16(change_info_->current_resolution.size.ToString()));
228 228
229 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 229 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
230 scoped_ptr<Notification> notification(new Notification( 230 std::unique_ptr<Notification> notification(new Notification(
231 message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message, 231 message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message,
232 timeout_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY), 232 timeout_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY),
233 base::string16() /* display_source */, GURL(), 233 base::string16() /* display_source */, GURL(),
234 message_center::NotifierId( 234 message_center::NotifierId(
235 message_center::NotifierId::SYSTEM_COMPONENT, 235 message_center::NotifierId::SYSTEM_COMPONENT,
236 system_notifier::kNotifierDisplayResolutionChange), 236 system_notifier::kNotifierDisplayResolutionChange),
237 data, new ResolutionChangeNotificationDelegate( 237 data, new ResolutionChangeNotificationDelegate(
238 this, change_info_->timeout_count > 0))); 238 this, change_info_->timeout_count > 0)));
239 notification->SetSystemPriority(); 239 notification->SetSystemPriority();
240 message_center->AddNotification(std::move(notification)); 240 message_center->AddNotification(std::move(notification));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 this, 303 this,
304 &ResolutionNotificationController::OnTimerTick); 304 &ResolutionNotificationController::OnTimerTick);
305 } 305 }
306 } 306 }
307 307
308 void ResolutionNotificationController::SuppressTimerForTest() { 308 void ResolutionNotificationController::SuppressTimerForTest() {
309 g_use_timer = false; 309 g_use_timer = false;
310 } 310 }
311 311
312 } // namespace ash 312 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/resolution_notification_controller.h ('k') | ash/display/root_window_transformers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698