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

Unified Diff: ash/common/wm_shell.h

Issue 2041423002: Moves MruWindowTracker to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_mru_window_tracker
Patch Set: merge Created 4 years, 6 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/common/wm/window_positioner.cc ('k') | ash/common/wm_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.h
diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h
index d111540cf7da655c1051edc4375f327ee5cfff7b..00b62accc51eea52d3d44f1c9e9f3313d47f9e53 100644
--- a/ash/common/wm_shell.h
+++ b/ash/common/wm_shell.h
@@ -18,6 +18,8 @@ class Rect;
namespace ash {
+class Shell;
+class MruWindowTracker;
class SessionStateDelegate;
class WindowResizer;
class WmActivationObserver;
@@ -35,13 +37,13 @@ enum class WmUserMetricsAction;
// Similar to ash::Shell. Eventually the two will be merged.
class ASH_EXPORT WmShell {
public:
- virtual ~WmShell() {}
-
// This is necessary for a handful of places that is difficult to plumb
// through context.
static void Set(WmShell* instance);
static WmShell* Get();
+ MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
+
// Creates a new window used as a container of other windows. No painting is
// done to the created window.
virtual WmWindow* NewContainerWindow() = 0;
@@ -59,12 +61,6 @@ class ASH_EXPORT WmShell {
// appropriate container in the returned window.
virtual WmWindow* GetRootWindowForNewWindows() = 0;
- // Returns the list of most recently used windows.
- virtual std::vector<WmWindow*> GetMruWindowList() = 0;
-
- // Returns the list of most 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.
@@ -106,8 +102,19 @@ class ASH_EXPORT WmShell {
virtual void AddOverviewModeObserver(WmOverviewModeObserver* observer) = 0;
virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0;
+ protected:
+ WmShell();
+ virtual ~WmShell();
+
+ void CreateMruWindowTracker();
+ void DeleteMruWindowTracker();
+
private:
+ friend class Shell;
+
static WmShell* instance_;
+
+ std::unique_ptr<MruWindowTracker> mru_window_tracker_;
};
} // namespace ash
« no previous file with comments | « ash/common/wm/window_positioner.cc ('k') | ash/common/wm_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698