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

Side by Side Diff: ui/aura/test/env_test_helper.h

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/aura/test/aura_test_utils.cc ('k') | ui/aura/window.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef UI_AURA_TEST_ENV_TEST_HELPER_H_ 5 #ifndef UI_AURA_TEST_ENV_TEST_HELPER_H_
6 #define UI_AURA_TEST_ENV_TEST_HELPER_H_ 6 #define UI_AURA_TEST_ENV_TEST_HELPER_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/aura/env.h" 11 #include "ui/aura/env.h"
12 #include "ui/aura/input_state_lookup.h" 12 #include "ui/aura/input_state_lookup.h"
13 13
14 namespace aura { 14 namespace aura {
15 namespace test { 15 namespace test {
16 16
17 class EnvTestHelper { 17 class EnvTestHelper {
18 public: 18 public:
19 explicit EnvTestHelper(Env* env) : env_(env) {} 19 explicit EnvTestHelper(Env* env) : env_(env) {}
20 ~EnvTestHelper() {} 20 ~EnvTestHelper() {}
21 21
22 void SetInputStateLookup(scoped_ptr<InputStateLookup> input_state_lookup) { 22 void SetInputStateLookup(
23 std::unique_ptr<InputStateLookup> input_state_lookup) {
23 env_->input_state_lookup_ = std::move(input_state_lookup); 24 env_->input_state_lookup_ = std::move(input_state_lookup);
24 } 25 }
25 26
26 void ResetEventState() { 27 void ResetEventState() {
27 env_->mouse_button_flags_ = 0; 28 env_->mouse_button_flags_ = 0;
28 env_->is_touch_down_ = false; 29 env_->is_touch_down_ = false;
29 } 30 }
30 31
31 private: 32 private:
32 Env* env_; 33 Env* env_;
33 34
34 DISALLOW_COPY_AND_ASSIGN(EnvTestHelper); 35 DISALLOW_COPY_AND_ASSIGN(EnvTestHelper);
35 }; 36 };
36 37
37 } // namespace test 38 } // namespace test
38 } // namespace aura 39 } // namespace aura
39 40
40 #endif // UI_AURA_TEST_ENV_TEST_HELPER_H_ 41 #endif // UI_AURA_TEST_ENV_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_utils.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698