OLD | NEW |
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" |
(...skipping 11 matching lines...) Loading... |
22 void SetInputStateLookup( | 22 void SetInputStateLookup( |
23 std::unique_ptr<InputStateLookup> input_state_lookup) { | 23 std::unique_ptr<InputStateLookup> input_state_lookup) { |
24 env_->input_state_lookup_ = std::move(input_state_lookup); | 24 env_->input_state_lookup_ = std::move(input_state_lookup); |
25 } | 25 } |
26 | 26 |
27 void ResetEventState() { | 27 void ResetEventState() { |
28 env_->mouse_button_flags_ = 0; | 28 env_->mouse_button_flags_ = 0; |
29 env_->is_touch_down_ = false; | 29 env_->is_touch_down_ = false; |
30 } | 30 } |
31 | 31 |
| 32 void SetWindowPortFactory(const Env::WindowPortFactory& factory) { |
| 33 env_->window_port_factory_ = factory; |
| 34 } |
| 35 |
32 private: | 36 private: |
33 Env* env_; | 37 Env* env_; |
34 | 38 |
35 DISALLOW_COPY_AND_ASSIGN(EnvTestHelper); | 39 DISALLOW_COPY_AND_ASSIGN(EnvTestHelper); |
36 }; | 40 }; |
37 | 41 |
38 } // namespace test | 42 } // namespace test |
39 } // namespace aura | 43 } // namespace aura |
40 | 44 |
41 #endif // UI_AURA_TEST_ENV_TEST_HELPER_H_ | 45 #endif // UI_AURA_TEST_ENV_TEST_HELPER_H_ |
OLD | NEW |