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

Unified Diff: services/ui/ws/window_server.cc

Issue 2274353003: Add PlatformScreenDelegate and start implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes for comments. Created 4 years, 4 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 | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_server_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) ==
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_server_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698