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

Unified Diff: ash/wm/common/wm_globals.cc

Issue 1943603002: Makes ash/wm/common a library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again Created 4 years, 7 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/wm/common/wm_globals.h ('k') | ash/wm/common/wm_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/common/wm_globals.cc
diff --git a/ash/wm/common/shelf/wm_shelf_util.cc b/ash/wm/common/wm_globals.cc
similarity index 50%
copy from ash/wm/common/shelf/wm_shelf_util.cc
copy to ash/wm/common/wm_globals.cc
index 5133feb7600ddba33547cf43974d2ab5edcd4bc6..0e61bdca5ed13b5a08d01daa56c911b0a3175028 100644
--- a/ash/wm/common/shelf/wm_shelf_util.cc
+++ b/ash/wm/common/wm_globals.cc
@@ -2,14 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/wm/common/shelf/wm_shelf_util.h"
+#include "ash/wm/common/wm_globals.h"
namespace ash {
namespace wm {
-bool IsHorizontalAlignment(wm::ShelfAlignment alignment) {
- return alignment == wm::SHELF_ALIGNMENT_BOTTOM ||
- alignment == wm::SHELF_ALIGNMENT_BOTTOM_LOCKED;
+// static
+WmGlobals* WmGlobals::instance_ = nullptr;
+
+// static
+void WmGlobals::Set(WmGlobals* instance) {
+ instance_ = instance;
+}
+
+// static
+WmGlobals* WmGlobals::Get() {
+ return instance_;
}
} // namespace wm
« no previous file with comments | « ash/wm/common/wm_globals.h ('k') | ash/wm/common/wm_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698