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

Side by Side Diff: ui/gfx/screen_mac.mm

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gfx/sys_color_change_listener.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/gfx/screen.h" 5 #include "ui/gfx/screen.h"
6 6
7 #import <ApplicationServices/ApplicationServices.h> 7 #import <ApplicationServices/ApplicationServices.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory>
12 13
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/mac/sdk_forward_declarations.h" 15 #include "base/mac/sdk_forward_declarations.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "ui/gfx/display.h" 18 #include "ui/gfx/display.h"
19 #include "ui/gfx/display_change_notifier.h" 19 #include "ui/gfx/display_change_notifier.h"
20 #include "ui/gfx/mac/coordinate_conversion.h" 20 #include "ui/gfx/mac/coordinate_conversion.h"
21 21
22 namespace { 22 namespace {
23 23
24 // The delay to handle the display configuration changes. 24 // The delay to handle the display configuration changes.
25 // See comments in ScreenMac::HandleDisplayReconfiguration. 25 // See comments in ScreenMac::HandleDisplayReconfiguration.
26 const int64_t kConfigureDelayMs = 500; 26 const int64_t kConfigureDelayMs = 500;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 return std::vector<gfx::Display>(1, GetPrimaryDisplay()); 242 return std::vector<gfx::Display>(1, GetPrimaryDisplay());
243 243
244 return displays; 244 return displays;
245 } 245 }
246 246
247 // The displays currently attached to the device. 247 // The displays currently attached to the device.
248 std::vector<gfx::Display> displays_; 248 std::vector<gfx::Display> displays_;
249 249
250 // The timer to delay configuring outputs. See also the comments in 250 // The timer to delay configuring outputs. See also the comments in
251 // HandleDisplayReconfiguration(). 251 // HandleDisplayReconfiguration().
252 scoped_ptr<base::OneShotTimer> configure_timer_; 252 std::unique_ptr<base::OneShotTimer> configure_timer_;
253 253
254 gfx::DisplayChangeNotifier change_notifier_; 254 gfx::DisplayChangeNotifier change_notifier_;
255 255
256 DISALLOW_COPY_AND_ASSIGN(ScreenMac); 256 DISALLOW_COPY_AND_ASSIGN(ScreenMac);
257 }; 257 };
258 258
259 } // namespace 259 } // namespace
260 260
261 namespace gfx { 261 namespace gfx {
262 262
263 #if !defined(USE_AURA) 263 #if !defined(USE_AURA)
264 Screen* CreateNativeScreen() { 264 Screen* CreateNativeScreen() {
265 return new ScreenMac; 265 return new ScreenMac;
266 } 266 }
267 #endif 267 #endif
268 268
269 } 269 }
OLDNEW
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gfx/sys_color_change_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698