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

Unified Diff: ash/test/wm_window_test_api.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/test/wm_window_test_api.h ('k') | ash/wm/always_on_top_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/wm_window_test_api.cc
diff --git a/ash/test/wm_window_test_api.cc b/ash/test/wm_window_test_api.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c21d58d74648ca812cd0cebf07047fa9d31b3b32
--- /dev/null
+++ b/ash/test/wm_window_test_api.cc
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/test/wm_window_test_api.h"
+
+namespace ash {
+
+// static
+int WmWindowTestApi::GlobalMinimumSizeLock::instance_count_ = 0;
+
+WmWindowTestApi::GlobalMinimumSizeLock::GlobalMinimumSizeLock() {
+ if (instance_count_ == 0)
+ WmWindowTestApi::SetDefaultUseEmptyMinimumSizeForTesting(true);
+ instance_count_++;
+}
+
+WmWindowTestApi::GlobalMinimumSizeLock::~GlobalMinimumSizeLock() {
+ DCHECK_GT(instance_count_, 0);
+ instance_count_--;
+ if (instance_count_ == 0)
+ WmWindowTestApi::SetDefaultUseEmptyMinimumSizeForTesting(false);
+}
+
+// static
+void WmWindowTestApi::SetDefaultUseEmptyMinimumSizeForTesting(bool value) {
+ WmWindow::default_use_empty_minimum_size_for_testing_ = value;
+}
+
+} // namespace ash
« no previous file with comments | « ash/test/wm_window_test_api.h ('k') | ash/wm/always_on_top_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698