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

Side by Side Diff: ui/base/x/selection_requestor_unittest.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/base/win/hwnd_subclass.h ('k') | ui/base/x/x11_util.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/base/x/selection_requestor.h" 5 #include "ui/base/x/selection_requestor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <memory>
8 9
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/memory/ref_counted_memory.h" 11 #include "base/memory/ref_counted_memory.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "ui/base/x/selection_utils.h" 14 #include "ui/base/x/selection_utils.h"
15 #include "ui/base/x/x11_util.h" 15 #include "ui/base/x/x11_util.h"
16 #include "ui/events/platform/platform_event_source.h" 16 #include "ui/events/platform/platform_event_source.h"
17 #include "ui/gfx/x/x11_atom_cache.h" 17 #include "ui/gfx/x/x11_atom_cache.h"
18 #include "ui/gfx/x/x11_types.h" 18 #include "ui/gfx/x/x11_types.h"
19 19
20 #include <X11/Xlib.h> 20 #include <X11/Xlib.h>
21 21
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 event_source_.reset(); 92 event_source_.reset();
93 XDestroyWindow(x_display_, x_window_); 93 XDestroyWindow(x_display_, x_window_);
94 XSynchronize(x_display_, False); 94 XSynchronize(x_display_, False);
95 } 95 }
96 96
97 Display* x_display_; 97 Display* x_display_;
98 98
99 // |requestor_|'s window. 99 // |requestor_|'s window.
100 XID x_window_; 100 XID x_window_;
101 101
102 scoped_ptr<ui::PlatformEventSource> event_source_; 102 std::unique_ptr<ui::PlatformEventSource> event_source_;
103 scoped_ptr<SelectionRequestor> requestor_; 103 std::unique_ptr<SelectionRequestor> requestor_;
104 104
105 base::MessageLoopForUI message_loop_; 105 base::MessageLoopForUI message_loop_;
106 X11AtomCache atom_cache_; 106 X11AtomCache atom_cache_;
107 107
108 private: 108 private:
109 DISALLOW_COPY_AND_ASSIGN(SelectionRequestorTest); 109 DISALLOW_COPY_AND_ASSIGN(SelectionRequestorTest);
110 }; 110 };
111 111
112 namespace { 112 namespace {
113 113
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 base::Bind(&SelectionRequestorTest::SendSelectionNotify, 158 base::Bind(&SelectionRequestorTest::SendSelectionNotify,
159 base::Unretained(this), 159 base::Unretained(this),
160 selection, 160 selection,
161 target2, 161 target2,
162 "Data2")); 162 "Data2"));
163 PerformBlockingConvertSelection( 163 PerformBlockingConvertSelection(
164 requestor_.get(), &atom_cache_, selection, target1, "Data1"); 164 requestor_.get(), &atom_cache_, selection, target1, "Data1");
165 } 165 }
166 166
167 } // namespace ui 167 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/hwnd_subclass.h ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698