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

Side by Side Diff: ash/wm/common/wm_globals.h

Issue 2012343002: Converts overview to use common ash types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_WM_COMMON_WM_GLOBALS_H_ 5 #ifndef ASH_WM_COMMON_WM_GLOBALS_H_
6 #define ASH_WM_COMMON_WM_GLOBALS_H_ 6 #define ASH_WM_COMMON_WM_GLOBALS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 25 matching lines...) Expand all
36 virtual ~WmGlobals() {} 36 virtual ~WmGlobals() {}
37 37
38 // This is necessary for a handful of places that is difficult to plumb 38 // This is necessary for a handful of places that is difficult to plumb
39 // through context. 39 // through context.
40 static void Set(WmGlobals* instance); 40 static void Set(WmGlobals* instance);
41 static WmGlobals* Get(); 41 static WmGlobals* Get();
42 42
43 virtual WmWindow* GetFocusedWindow() = 0; 43 virtual WmWindow* GetFocusedWindow() = 0;
44 virtual WmWindow* GetActiveWindow() = 0; 44 virtual WmWindow* GetActiveWindow() = 0;
45 45
46 virtual WmWindow* GetPrimaryRootWindow() = 0;
47
46 // Returns the root window for the specified display. 48 // Returns the root window for the specified display.
47 virtual WmWindow* GetRootWindowForDisplayId(int64_t display_id) = 0; 49 virtual WmWindow* GetRootWindowForDisplayId(int64_t display_id) = 0;
48 50
49 // Returns the root window that newly created windows should be added to. 51 // Returns the root window that newly created windows should be added to.
50 // NOTE: this returns the root, newly created window should be added to the 52 // NOTE: this returns the root, newly created window should be added to the
51 // appropriate container in the returned window. 53 // appropriate container in the returned window.
52 virtual WmWindow* GetRootWindowForNewWindows() = 0; 54 virtual WmWindow* GetRootWindowForNewWindows() = 0;
53 55
54 // returns the list of more recently used windows excluding modals. 56 // Returns the list of more recently used windows.
James Cook 2016/05/27 00:02:51 super-nit: *most* recently used
sky 2016/05/27 03:18:03 Done.
57 virtual std::vector<WmWindow*> GetMruWindowList() = 0;
58
59 // Returns the list of more recently used windows excluding modals.
55 virtual std::vector<WmWindow*> GetMruWindowListIgnoreModals() = 0; 60 virtual std::vector<WmWindow*> GetMruWindowListIgnoreModals() = 0;
56 61
57 // Returns true if the first window shown on first run should be 62 // Returns true if the first window shown on first run should be
58 // unconditionally maximized, overriding the heuristic that normally chooses 63 // unconditionally maximized, overriding the heuristic that normally chooses
59 // the window size. 64 // the window size.
60 virtual bool IsForceMaximizeOnFirstRun() = 0; 65 virtual bool IsForceMaximizeOnFirstRun() = 0;
61 66
62 virtual bool IsUserSessionBlocked() = 0; 67 virtual bool IsUserSessionBlocked() = 0;
63 virtual bool IsScreenLocked() = 0; 68 virtual bool IsScreenLocked() = 0;
64 69
(...skipping 27 matching lines...) Expand all
92 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0; 97 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0;
93 98
94 private: 99 private:
95 static WmGlobals* instance_; 100 static WmGlobals* instance_;
96 }; 101 };
97 102
98 } // namespace wm 103 } // namespace wm
99 } // namespace ash 104 } // namespace ash
100 105
101 #endif // ASH_WM_COMMON_WM_GLOBALS_H_ 106 #endif // ASH_WM_COMMON_WM_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698