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

Side by Side Diff: ui/surface/transport_dib_win.cc

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/surface/transport_dib_posix.cc ('k') | ui/touch_selection/touch_handle.h » ('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/surface/transport_dib.h" 5 #include "ui/surface/transport_dib.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <limits> 11 #include <limits>
12 #include <memory>
12 13
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/sys_info.h" 15 #include "base/sys_info.h"
16 #include "skia/ext/platform_canvas.h" 16 #include "skia/ext/platform_canvas.h"
17 17
18 TransportDIB::TransportDIB() 18 TransportDIB::TransportDIB()
19 : size_(0) { 19 : size_(0) {
20 } 20 }
21 21
22 TransportDIB::~TransportDIB() { 22 TransportDIB::~TransportDIB() {
23 } 23 }
24 24
(...skipping 10 matching lines...) Expand all
35 } 35 }
36 36
37 dib->size_ = size; 37 dib->size_ = size;
38 dib->sequence_num_ = sequence_num; 38 dib->sequence_num_ = sequence_num;
39 39
40 return dib; 40 return dib;
41 } 41 }
42 42
43 // static 43 // static
44 TransportDIB* TransportDIB::Map(Handle handle) { 44 TransportDIB* TransportDIB::Map(Handle handle) {
45 scoped_ptr<TransportDIB> dib(CreateWithHandle(handle)); 45 std::unique_ptr<TransportDIB> dib(CreateWithHandle(handle));
46 if (!dib->Map()) 46 if (!dib->Map())
47 return NULL; 47 return NULL;
48 return dib.release(); 48 return dib.release();
49 } 49 }
50 50
51 // static 51 // static
52 TransportDIB* TransportDIB::CreateWithHandle(Handle handle) { 52 TransportDIB* TransportDIB::CreateWithHandle(Handle handle) {
53 return new TransportDIB(handle); 53 return new TransportDIB(handle);
54 } 54 }
55 55
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return false; 91 return false;
92 } 92 }
93 93
94 size_ = shared_memory_.mapped_size(); 94 size_ = shared_memory_.mapped_size();
95 return true; 95 return true;
96 } 96 }
97 97
98 void* TransportDIB::memory() const { 98 void* TransportDIB::memory() const {
99 return shared_memory_.memory(); 99 return shared_memory_.memory();
100 } 100 }
OLDNEW
« no previous file with comments | « ui/surface/transport_dib_posix.cc ('k') | ui/touch_selection/touch_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698