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

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

Issue 2712203002: c++ / mojo changes for 'external window mode'
Patch Set: addressed sky/fwang feedback (take 5), simpler mus_demo changes / passing unittests Created 3 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
Index: services/ui/ws/window_server.h
diff --git a/services/ui/ws/window_server.h b/services/ui/ws/window_server.h
index fce14fad9a3ddb4485f8a024e0cd51231fabf4cc..40f08b11b1232e0dbf096f3f59a6b5656a2ec002 100644
--- a/services/ui/ws/window_server.h
+++ b/services/ui/ws/window_server.h
@@ -27,6 +27,7 @@
#include "services/ui/ws/user_id_tracker.h"
#include "services/ui/ws/user_id_tracker_observer.h"
#include "services/ui/ws/window_manager_window_tree_factory_set.h"
+#include "services/ui/ws/window_tree_host_factory.h"
namespace ui {
namespace ws {
@@ -136,12 +137,25 @@ class WindowServer : public ServerWindowDelegate,
return &window_manager_window_tree_factory_set_;
}
+ WindowTreeHostFactory* window_tree_host_factory() {
+ return window_tree_host_factory_.get();
+ }
+
+ void set_window_tree_host_factory(
+ std::unique_ptr<WindowTreeHostFactory> factory) {
+ DCHECK(factory);
+ window_tree_host_factory_ = std::move(factory);
+ }
+
// Sets focus to |window|. Returns true if |window| already has focus, or
// focus was successfully changed. Returns |false| if |window| is not a valid
// window to receive focus.
bool SetFocusedWindow(ServerWindow* window);
ServerWindow* GetFocusedWindow();
+ void SetInExternalWindowMode() { in_external_window_mode = true; }
+ bool IsInExternalWindowMode() const { return in_external_window_mode; }
+
bool IsActiveUserInHighContrastMode() const;
void SetHighContrastMode(const UserId& user, bool enabled);
@@ -379,6 +393,8 @@ class WindowServer : public ServerWindowDelegate,
WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_;
+ std::unique_ptr<WindowTreeHostFactory> window_tree_host_factory_;
kylechar 2017/03/07 18:19:37 There is already a WindowTreeHostFactory in ui::Se
tonikitoo 2017/03/07 20:09:36 I tried to avoid it, and saw that service has a Wi
+
cc::SurfaceId root_surface_id_;
mojo::Binding<cc::mojom::DisplayCompositorClient>
@@ -386,6 +402,8 @@ class WindowServer : public ServerWindowDelegate,
// State for rendering into a Surface.
cc::mojom::DisplayCompositorPtr display_compositor_;
+ bool in_external_window_mode = false;
+
DISALLOW_COPY_AND_ASSIGN(WindowServer);
};

Powered by Google App Engine
This is Rietveld 408576698