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

Unified Diff: components/mus/ws/display.h

Issue 1775583002: Moves FrameDecorations from Display to WindowManagerState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: override Created 4 years, 9 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 | « components/mus/ws/connection_manager.cc ('k') | components/mus/ws/display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/display.h
diff --git a/components/mus/ws/display.h b/components/mus/ws/display.h
index 761aa82265f54fce716c8c453e6d35a3cc86b238..69cfb9ef99dee678807d387332e1c2fd524739ef 100644
--- a/components/mus/ws/display.h
+++ b/components/mus/ws/display.h
@@ -74,11 +74,13 @@ class Display : public PlatformDisplayDelegate,
uint32_t id() const { return id_; }
- // TODO(sky): move to WMM.
- void SetFrameDecorationValues(mojom::FrameDecorationValuesPtr values);
- const mojom::FrameDecorationValues& frame_decoration_values() const {
- return *frame_decoration_values_;
- }
+ DisplayManager* display_manager();
+ const DisplayManager* display_manager() const;
+
+ // Returns a mojom::Display for the specified display. WindowManager specific
+ // values are not set. In general you should use
+ // WindowManagerState::ToMojomDisplay().
+ mojom::DisplayPtr ToMojomDisplay() const;
// Schedules a paint for the specified region in the coordinates of |window|.
void SchedulePaint(const ServerWindow* window, const gfx::Rect& bounds);
@@ -107,7 +109,13 @@ class Display : public PlatformDisplayDelegate,
WindowManagerState* GetWindowManagerStateWithRoot(const ServerWindow* window);
// TODO(sky): this is wrong, plumb through user_id.
WindowManagerState* GetFirstWindowManagerState();
- WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id);
+ WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id) {
+ return const_cast<WindowManagerState*>(
+ const_cast<const Display*>(this)->GetWindowManagerStateForUser(
+ user_id));
+ }
+ const WindowManagerState* GetWindowManagerStateForUser(
+ const UserId& user_id) const;
size_t num_window_manger_states() const {
return window_manager_state_map_.size();
}
@@ -178,9 +186,6 @@ class Display : public PlatformDisplayDelegate,
// Inits the necessary state once the display is ready.
void InitWindowManagersIfNecessary();
- DisplayManager* display_manager();
- const DisplayManager* display_manager() const;
-
void OnEventAckTimeout();
// Schedules an event to be processed later.
@@ -274,8 +279,6 @@ class Display : public PlatformDisplayDelegate,
WindowManagerStateMap window_manager_state_map_;
- mojom::FrameDecorationValuesPtr frame_decoration_values_;
-
DISALLOW_COPY_AND_ASSIGN(Display);
};
« no previous file with comments | « components/mus/ws/connection_manager.cc ('k') | components/mus/ws/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698