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 24 matching lines...) Expand all Loading... |
35 if (mode == Env::Mode::MUS) | 35 if (mode == Env::Mode::MUS) |
36 env_->EnableMusOSExchangeDataProvider(); | 36 env_->EnableMusOSExchangeDataProvider(); |
37 } | 37 } |
38 | 38 |
39 WindowTreeClient* GetWindowTreeClient() { return env_->window_tree_client_; } | 39 WindowTreeClient* GetWindowTreeClient() { return env_->window_tree_client_; } |
40 | 40 |
41 // This circumvents the DCHECKs in Env::SetWindowTreeClient() and should | 41 // This circumvents the DCHECKs in Env::SetWindowTreeClient() and should |
42 // only be used for tests where Env is long lived. | 42 // only be used for tests where Env is long lived. |
43 void SetWindowTreeClient(WindowTreeClient* window_tree_client) { | 43 void SetWindowTreeClient(WindowTreeClient* window_tree_client) { |
44 env_->window_tree_client_ = window_tree_client; | 44 env_->window_tree_client_ = window_tree_client; |
| 45 env_->in_mus_shutdown_ = window_tree_client ? false : true; |
45 } | 46 } |
46 | 47 |
47 void SetAlwaysUseLastMouseLocation(bool value) { | 48 void SetAlwaysUseLastMouseLocation(bool value) { |
48 env_->always_use_last_mouse_location_ = value; | 49 env_->always_use_last_mouse_location_ = value; |
49 } | 50 } |
50 | 51 |
51 private: | 52 private: |
52 Env* env_; | 53 Env* env_; |
53 | 54 |
54 DISALLOW_COPY_AND_ASSIGN(EnvTestHelper); | 55 DISALLOW_COPY_AND_ASSIGN(EnvTestHelper); |
55 }; | 56 }; |
56 | 57 |
57 } // namespace test | 58 } // namespace test |
58 } // namespace aura | 59 } // namespace aura |
59 | 60 |
60 #endif // UI_AURA_TEST_ENV_TEST_HELPER_H_ | 61 #endif // UI_AURA_TEST_ENV_TEST_HELPER_H_ |
OLD | NEW |