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

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

Issue 1900443002: Removes aura dependencies from WindowPositioner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke GetWorkAreaForWindowInParent and fix windows Created 4 years, 8 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/window_positioning_utils.cc ('k') | ash/wm/common/wm_root_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/common/wm_globals.h
diff --git a/ash/wm/common/wm_globals.h b/ash/wm/common/wm_globals.h
new file mode 100644
index 0000000000000000000000000000000000000000..7c977230fc9b41262d456b2536481df1177b7cf2
--- /dev/null
+++ b/ash/wm/common/wm_globals.h
@@ -0,0 +1,51 @@
+// 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.
+
+#ifndef ASH_WM_COMMON_WM_GLOBALS_H_
+#define ASH_WM_COMMON_WM_GLOBALS_H_
+
+#include <vector>
+
+#include "ash/ash_export.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace ash {
+namespace wm {
+
+class WmWindow;
+
+// Used for accessing global state.
+class ASH_EXPORT WmGlobals {
+ public:
+ virtual ~WmGlobals() {}
+
+ // This is necessary for a handful of places that is difficult to plumb
+ // through context.
+ static WmGlobals* Get();
+
+ virtual WmWindow* GetActiveWindow() = 0;
+
+ // Returns the root window that newly created windows should be added to.
+ // NOTE: this returns the root, newly created window should be added to the
+ // appropriate container in the returned window.
+ virtual WmWindow* GetRootWindowForNewWindows() = 0;
+
+ // returns the list of more recently used windows excluding modals.
+ virtual std::vector<WmWindow*> GetMruWindowListIgnoreModals() = 0;
+
+ // Returns true if the first window shown on first run should be
+ // unconditionally maximized, overriding the heuristic that normally chooses
+ // the window size.
+ virtual bool IsForceMaximizeOnFirstRun() = 0;
+
+ virtual std::vector<WmWindow*> GetAllRootWindows() = 0;
+};
+
+} // namespace wm
+} // namespace ash
+
+#endif // ASH_WM_COMMON_WM_GLOBALS_H_
« no previous file with comments | « ash/wm/common/window_positioning_utils.cc ('k') | ash/wm/common/wm_root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698