diff options
author | sky <sky@chromium.org> | 2016-03-25 16:30:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 23:33:10 +0000 |
commit | 19019f27a62f561909f0ec733510bacbd74b374c (patch) | |
tree | d56084fd448cecd5d30e8796a8aaf9111a51ae1b /components/mus/ws/window_server_delegate.h | |
parent | c4f0abb4666f3296485e53fd5ede71f161938048 (diff) | |
download | chromium_src-19019f27a62f561909f0ec733510bacbd74b374c.zip chromium_src-19019f27a62f561909f0ec733510bacbd74b374c.tar.gz chromium_src-19019f27a62f561909f0ec733510bacbd74b374c.tar.bz2 |
Routes setting focus through WindowServer so it can notify other displays
This way we only have one Display with focus.
BUG=none
TEST=none
R=ben@chromium.org
Review URL: https://codereview.chromium.org/1833873004
Cr-Commit-Position: refs/heads/master@{#383403}
Diffstat (limited to 'components/mus/ws/window_server_delegate.h')
-rw-r--r-- | components/mus/ws/window_server_delegate.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/components/mus/ws/window_server_delegate.h b/components/mus/ws/window_server_delegate.h index e7ca4a2..05e32a0 100644 --- a/components/mus/ws/window_server_delegate.h +++ b/components/mus/ws/window_server_delegate.h @@ -32,22 +32,28 @@ class WindowTreeBinding; class WindowServerDelegate { public: + enum BindingType { + EMBED, + WINDOW_MANAGER, + }; + + // Called if no Displays have been created, but a WindowManagerFactory has + // been set. + virtual void CreateDefaultDisplays() = 0; + // Called once when the AcceleratedWidget of a Display is available. virtual void OnFirstDisplayReady(); virtual void OnNoMoreDisplays() = 0; - // Creates a WindowTreeBinding in response to Embed() calls on the - // WindowServer. - virtual scoped_ptr<WindowTreeBinding> CreateWindowTreeBindingForEmbedAtWindow( + // Creates a WindowTreeBinding. Default implementation returns null, which + // creates DefaultBinding. + virtual scoped_ptr<WindowTreeBinding> CreateWindowTreeBinding( + BindingType type, ws::WindowServer* window_server, ws::WindowTree* tree, - mojom::WindowTreeRequest tree_request, - mojom::WindowTreeClientPtr client) = 0; - - // Called if no Displays have been created, but a WindowManagerFactory has - // been set. - virtual void CreateDefaultDisplays() = 0; + mojom::WindowTreeRequest* tree_request, + mojom::WindowTreeClientPtr* client); protected: virtual ~WindowServerDelegate() {} |