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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc

Issue 809903005: ui/views: Cleanup usage of scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no need of Pass() Created 5 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 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 <map> 5 #include <map>
6 #include <vector> 6 #include <vector>
7 7
8 // Include views_test_base.h first because the definition of None in X.h 8 // Include views_test_base.h first because the definition of None in X.h
9 // conflicts with the definition of None in gtest-type-util.h 9 // conflicts with the definition of None in gtest-type-util.h
10 #include "ui/views/test/views_test_base.h" 10 #include "ui/views/test/views_test_base.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 target_xid_ = xid; 279 target_xid_ = xid;
280 } 280 }
281 281
282 bool SimpleTestDragDropClient::IsMoveLoopRunning() { 282 bool SimpleTestDragDropClient::IsMoveLoopRunning() {
283 return loop_->IsRunning(); 283 return loop_->IsRunning();
284 } 284 }
285 285
286 scoped_ptr<X11MoveLoop> SimpleTestDragDropClient::CreateMoveLoop( 286 scoped_ptr<X11MoveLoop> SimpleTestDragDropClient::CreateMoveLoop(
287 X11MoveLoopDelegate* delegate) { 287 X11MoveLoopDelegate* delegate) {
288 loop_ = new TestMoveLoop(delegate); 288 loop_ = new TestMoveLoop(delegate);
289 return scoped_ptr<X11MoveLoop>(loop_); 289 return make_scoped_ptr(loop_);
290 } 290 }
291 291
292 XID SimpleTestDragDropClient::FindWindowFor(const gfx::Point& screen_point) { 292 XID SimpleTestDragDropClient::FindWindowFor(const gfx::Point& screen_point) {
293 return target_xid_; 293 return target_xid_;
294 } 294 }
295 295
296 /////////////////////////////////////////////////////////////////////////////// 296 ///////////////////////////////////////////////////////////////////////////////
297 // TestDragDropClient 297 // TestDragDropClient
298 298
299 // static 299 // static
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 // the aura::client::DragDropDelegate is properly notified. 958 // the aura::client::DragDropDelegate is properly notified.
959 TEST_F(DesktopDragDropClientAuraX11ChromeSourceTargetTest, CtrlPressed) { 959 TEST_F(DesktopDragDropClientAuraX11ChromeSourceTargetTest, CtrlPressed) {
960 base::MessageLoop::current()->PostTask( 960 base::MessageLoop::current()->PostTask(
961 FROM_HERE, 961 FROM_HERE,
962 base::Bind(&ChromeSourceTargetStep2, client(), ui::EF_CONTROL_DOWN)); 962 base::Bind(&ChromeSourceTargetStep2, client(), ui::EF_CONTROL_DOWN));
963 int result = StartDragAndDrop(); 963 int result = StartDragAndDrop();
964 EXPECT_EQ(ui::DragDropTypes::DRAG_COPY, result); 964 EXPECT_EQ(ui::DragDropTypes::DRAG_COPY, result);
965 } 965 }
966 966
967 } // namespace views 967 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698