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

Side by Side Diff: ash/test/wm_window_test_api.h

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback Created 3 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
« no previous file with comments | « ash/test/wm_window_aura_test_api.cc ('k') | ash/test/wm_window_test_api.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ASH_TEST_WM_WINDOW_AURA_TEST_API_H_ 5 #ifndef ASH_TEST_WM_WINDOW_TEST_API_H_
6 #define ASH_TEST_WM_WINDOW_AURA_TEST_API_H_ 6 #define ASH_TEST_WM_WINDOW_TEST_API_H_
7 7
8 #include "ash/aura/wm_window_aura.h" 8 #include "ash/common/wm_window.h"
9 9
10 namespace ash { 10 namespace ash {
11 11
12 class WmWindowAuraTestApi { 12 class WmWindowTestApi {
13 public: 13 public:
14 // Used by tests to set the default value of 14 // Used by tests to set the default value of
15 // |WmWindowAura::default_use_empty_minimum_size_for_testing_|. This is needed 15 // |WmWindow::default_use_empty_minimum_size_for_testing_|. This is needed
16 // as tests don't have a good way to reset the value of 16 // as tests don't have a good way to reset the value of
17 // |use_empty_minimum_size_for_testing_| before the minimum size is queried. 17 // |use_empty_minimum_size_for_testing_| before the minimum size is queried.
18 class GlobalMinimumSizeLock { 18 class GlobalMinimumSizeLock {
19 public: 19 public:
20 GlobalMinimumSizeLock(); 20 GlobalMinimumSizeLock();
21 ~GlobalMinimumSizeLock(); 21 ~GlobalMinimumSizeLock();
22 22
23 private: 23 private:
24 // Number of instances of GlobalMinimumSizeLock that have been created. 24 // Number of instances of GlobalMinimumSizeLock that have been created.
25 static int instance_count_; 25 static int instance_count_;
26 26
27 DISALLOW_COPY_AND_ASSIGN(GlobalMinimumSizeLock); 27 DISALLOW_COPY_AND_ASSIGN(GlobalMinimumSizeLock);
28 }; 28 };
29 29
30 explicit WmWindowAuraTestApi(WmWindow* window) 30 explicit WmWindowTestApi(WmWindow* window) : window_(window) {}
31 : WmWindowAuraTestApi(static_cast<WmWindowAura*>(window)) {} 31 ~WmWindowTestApi() {}
32 explicit WmWindowAuraTestApi(WmWindowAura* window) : window_(window) {}
33 ~WmWindowAuraTestApi() {}
34 32
35 void set_use_empty_minimum_size(bool value) { 33 void set_use_empty_minimum_size(bool value) {
36 window_->use_empty_minimum_size_for_testing_ = true; 34 window_->use_empty_minimum_size_for_testing_ = true;
37 } 35 }
38 36
39 private: 37 private:
40 static void SetDefaultUseEmptyMinimumSizeForTesting(bool value); 38 static void SetDefaultUseEmptyMinimumSizeForTesting(bool value);
41 39
42 WmWindowAura* window_; 40 WmWindow* window_;
43 41
44 DISALLOW_COPY_AND_ASSIGN(WmWindowAuraTestApi); 42 DISALLOW_COPY_AND_ASSIGN(WmWindowTestApi);
45 }; 43 };
46 44
47 } // namespace ash 45 } // namespace ash
48 46
49 #endif // ASH_TEST_WM_WINDOW_AURA_TEST_API_H_ 47 #endif // ASH_TEST_WM_WINDOW_TEST_API_H_
OLDNEW
« no previous file with comments | « ash/test/wm_window_aura_test_api.cc ('k') | ash/test/wm_window_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698