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

Side by Side Diff: ui/aura/test/aura_test_utils.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/aura/scoped_window_targeter.cc ('k') | ui/aura/test/env_test_helper.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 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/aura/test/aura_test_utils.h" 5 #include "ui/aura/test/aura_test_utils.h"
6 6
7 #include <utility>
8
7 #include "ui/aura/window_event_dispatcher.h" 9 #include "ui/aura/window_event_dispatcher.h"
8 #include "ui/aura/window_tree_host.h" 10 #include "ui/aura/window_tree_host.h"
9 11
10 namespace aura { 12 namespace aura {
11 namespace test { 13 namespace test {
12 14
13 class WindowTreeHostTestApi { 15 class WindowTreeHostTestApi {
14 public: 16 public:
15 explicit WindowTreeHostTestApi(WindowTreeHost* host) : host_(host) {} 17 explicit WindowTreeHostTestApi(WindowTreeHost* host) : host_(host) {}
16 18
17 const gfx::Point& last_cursor_request_position_in_host() { 19 const gfx::Point& last_cursor_request_position_in_host() {
18 return host_->last_cursor_request_position_in_host_; 20 return host_->last_cursor_request_position_in_host_;
19 } 21 }
20 22
21 void set_dispatcher(scoped_ptr<WindowEventDispatcher> dispatcher) { 23 void set_dispatcher(scoped_ptr<WindowEventDispatcher> dispatcher) {
22 host_->dispatcher_ = dispatcher.Pass(); 24 host_->dispatcher_ = std::move(dispatcher);
23 } 25 }
24 26
25 private: 27 private:
26 WindowTreeHost* host_; 28 WindowTreeHost* host_;
27 29
28 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostTestApi); 30 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostTestApi);
29 }; 31 };
30 32
31 const gfx::Point& QueryLatestMousePositionRequestInHost(WindowTreeHost* host) { 33 const gfx::Point& QueryLatestMousePositionRequestInHost(WindowTreeHost* host) {
32 WindowTreeHostTestApi host_test_api(host); 34 WindowTreeHostTestApi host_test_api(host);
33 return host_test_api.last_cursor_request_position_in_host(); 35 return host_test_api.last_cursor_request_position_in_host();
34 } 36 }
35 37
36 void SetHostDispatcher(WindowTreeHost* host, 38 void SetHostDispatcher(WindowTreeHost* host,
37 scoped_ptr<WindowEventDispatcher> dispatcher) { 39 scoped_ptr<WindowEventDispatcher> dispatcher) {
38 WindowTreeHostTestApi host_test_api(host); 40 WindowTreeHostTestApi host_test_api(host);
39 host_test_api.set_dispatcher(dispatcher.Pass()); 41 host_test_api.set_dispatcher(std::move(dispatcher));
40 } 42 }
41 43
42 } // namespace test 44 } // namespace test
43 } // namespace aura 45 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/scoped_window_targeter.cc ('k') | ui/aura/test/env_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698