| Index: services/ui/ws/window_server.cc
|
| diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
|
| index 5e1128644a673db5bd75d6d322fe4afd7e0a6fbb..02d56c46f37815d4b110ef4a306deb1d1e64fc5e 100644
|
| --- a/services/ui/ws/window_server.cc
|
| +++ b/services/ui/ws/window_server.cc
|
| @@ -37,11 +37,9 @@ struct WindowServer::CurrentMoveLoopState {
|
| gfx::Rect revert_bounds;
|
| };
|
|
|
| -WindowServer::WindowServer(
|
| - WindowServerDelegate* delegate,
|
| - const scoped_refptr<ui::SurfacesState>& surfaces_state)
|
| +WindowServer::WindowServer(WindowServerDelegate* delegate)
|
| : delegate_(delegate),
|
| - surfaces_state_(surfaces_state),
|
| + surfaces_state_(new SurfacesState()),
|
| next_client_id_(1),
|
| display_manager_(new DisplayManager(this, &user_id_tracker_)),
|
| current_operation_(nullptr),
|
| @@ -484,6 +482,37 @@ gfx::Rect WindowServer::GetCurrentMoveLoopRevertBounds() {
|
| return gfx::Rect();
|
| }
|
|
|
| +void WindowServer::OnFirstDisplayReady() {
|
| + delegate_->OnFirstDisplayReady();
|
| +}
|
| +
|
| +void WindowServer::OnNoMoreDisplays() {
|
| + delegate_->OnNoMoreDisplays();
|
| +}
|
| +
|
| +WindowManagerState* WindowServer::GetWindowManagerStateForUser(
|
| + const UserId& user_id) {
|
| + return window_manager_window_tree_factory_set_.GetWindowManagerStateForUser(
|
| + user_id);
|
| +}
|
| +
|
| +ui::SurfacesState* WindowServer::GetSurfacesState() {
|
| + return surfaces_state_.get();
|
| +}
|
| +
|
| +bool WindowServer::GetFrameDecorationsForUser(
|
| + const UserId& user_id,
|
| + mojom::FrameDecorationValuesPtr* values) {
|
| + WindowManagerState* window_manager_state =
|
| + window_manager_window_tree_factory_set_.GetWindowManagerStateForUser(
|
| + user_id);
|
| + if (!window_manager_state)
|
| + return false;
|
| + if (values && window_manager_state->got_frame_decoration_values())
|
| + *values = window_manager_state->frame_decoration_values().Clone();
|
| + return window_manager_state->got_frame_decoration_values();
|
| +}
|
| +
|
| bool WindowServer::GetAndClearInFlightWindowManagerChange(
|
| uint32_t window_manager_change_id,
|
| InFlightWindowManagerChange* change) {
|
| @@ -546,10 +575,6 @@ bool WindowServer::IsUserInHighContrastMode(const UserId& user) const {
|
| return (iter == high_contrast_mode_.end()) ? false : iter->second;
|
| }
|
|
|
| -ui::SurfacesState* WindowServer::GetSurfacesState() {
|
| - return surfaces_state_.get();
|
| -}
|
| -
|
| void WindowServer::OnScheduleWindowPaint(ServerWindow* window) {
|
| if (in_destructor_)
|
| return;
|
| @@ -739,33 +764,6 @@ void WindowServer::OnTransientWindowRemoved(ServerWindow* window,
|
| }
|
| }
|
|
|
| -void WindowServer::OnFirstDisplayReady() {
|
| - delegate_->OnFirstDisplayReady();
|
| -}
|
| -
|
| -void WindowServer::OnNoMoreDisplays() {
|
| - delegate_->OnNoMoreDisplays();
|
| -}
|
| -
|
| -bool WindowServer::GetFrameDecorationsForUser(
|
| - const UserId& user_id,
|
| - mojom::FrameDecorationValuesPtr* values) {
|
| - WindowManagerState* window_manager_state =
|
| - window_manager_window_tree_factory_set_.GetWindowManagerStateForUser(
|
| - user_id);
|
| - if (!window_manager_state)
|
| - return false;
|
| - if (values && window_manager_state->got_frame_decoration_values())
|
| - *values = window_manager_state->frame_decoration_values().Clone();
|
| - return window_manager_state->got_frame_decoration_values();
|
| -}
|
| -
|
| -WindowManagerState* WindowServer::GetWindowManagerStateForUser(
|
| - const UserId& user_id) {
|
| - return window_manager_window_tree_factory_set_.GetWindowManagerStateForUser(
|
| - user_id);
|
| -}
|
| -
|
| void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id,
|
| const UserId& active_id) {
|
| if (IsUserInHighContrastMode(previously_active_id) ==
|
|
|