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

Side by Side Diff: ash/mus/bridge/wm_window_mus_test_api.h

Issue 2613793002: Removes/promotes functions from WmWindowMus to WmWindowAura (Closed)
Patch Set: move WmWindowAuraTestApi to ash/test 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/mus/bridge/wm_window_mus.cc ('k') | ash/mus/bridge/wm_window_mus_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_MUS_BRIDGE_WM_WINDOW_MUS_TEST_API_H_
6 #define ASH_MUS_BRIDGE_WM_WINDOW_MUS_TEST_API_H_
7
8 #include "ash/mus/bridge/wm_window_mus.h"
9
10 namespace ash {
11 namespace mus {
12
13 class WmWindowMusTestApi {
14 public:
15 // Used by tests to set the default value of
16 // |WmWindowMus::default_use_empty_minimum_size_for_testing_|. This is needed
17 // as tests don't have a good way to reset the value of
18 // |use_empty_minimum_size_for_testing_| before the minimum size is queried.
19 class GlobalMinimumSizeLock {
20 public:
21 GlobalMinimumSizeLock();
22 ~GlobalMinimumSizeLock();
23
24 private:
25 // Number of instances of GlobalMinimumSizeLock that have been created.
26 static int instance_count_;
27
28 DISALLOW_COPY_AND_ASSIGN(GlobalMinimumSizeLock);
29 };
30
31 explicit WmWindowMusTestApi(WmWindow* window)
32 : WmWindowMusTestApi(WmWindowMus::AsWmWindowMus(window)) {}
33 explicit WmWindowMusTestApi(WmWindowMus* window) : window_(window) {}
34 ~WmWindowMusTestApi() {}
35
36 void set_use_empty_minimum_size(bool value) {
37 window_->use_empty_minimum_size_for_testing_ = true;
38 }
39
40 private:
41 static void SetDefaultUseEmptyMinimumSizeForTesting(bool value);
42
43 WmWindowMus* window_;
44
45 DISALLOW_COPY_AND_ASSIGN(WmWindowMusTestApi);
46 };
47
48 } // namespace mus
49 } // namespace ash
50
51 #endif // ASH_MUS_BRIDGE_WM_WINDOW_MUS_TEST_API_H_
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_window_mus.cc ('k') | ash/mus/bridge/wm_window_mus_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698