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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_impl.h

Issue 1567623003: Adds remainder of support for multiple roots to WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 4 years, 11 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/public/cpp/lib/window.cc ('k') | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/lib/window_tree_client_impl.h
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.h b/components/mus/public/cpp/lib/window_tree_client_impl.h
index b5955488196e7850ad006fc477f8f8014b346252..42bf0cbdfb8b7c19cbd56b0006560c31ea6b274c 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.h
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.h
@@ -66,7 +66,7 @@ class WindowTreeClientImpl : public WindowTreeConnection,
mojom::OrderDirection direction);
// Returns true if the specified window was created by this connection.
- bool OwnsWindow(Id id) const;
+ bool OwnsWindow(Window* window) const;
void SetBounds(Window* window,
const gfx::Rect& old_bounds,
@@ -116,6 +116,11 @@ class WindowTreeClientImpl : public WindowTreeConnection,
private:
friend class WindowTreeClientImplPrivate;
+ enum class NewWindowType {
+ CHILD,
+ TOP_LEVEL,
+ };
+
using IdToWindowMap = std::map<Id, Window*>;
using InFlightMap = std::map<uint32_t, scoped_ptr<InFlightChange>>;
@@ -132,6 +137,9 @@ class WindowTreeClientImpl : public WindowTreeConnection,
// See InFlightChange for details on how InFlightChanges are used.
bool ApplyServerChangeToExistingInFlightChange(const InFlightChange& change);
+ Window* NewWindowImpl(NewWindowType type,
+ const Window::SharedProperties* properties);
+
// OnEmbed() calls into this. Exposed as a separate function for testing.
void OnEmbedImpl(mojom::WindowTree* window_tree,
ConnectionSpecificId connection_id,
@@ -145,6 +153,8 @@ class WindowTreeClientImpl : public WindowTreeConnection,
Window* GetWindowById(Id id) override;
Window* GetFocusedWindow() override;
Window* NewWindow(const Window::SharedProperties* properties) override;
+ Window* NewTopLevelWindow(
+ const Window::SharedProperties* properties) override;
bool IsEmbedRoot() override;
ConnectionSpecificId GetConnectionId() override;
void AddObserver(WindowTreeConnectionObserver* observer) override;
@@ -207,6 +217,9 @@ class WindowTreeClientImpl : public WindowTreeConnection,
Id window_id,
const mojo::String& name,
mojo::Array<uint8_t> transit_data) override;
+ void WmCreateTopLevelWindow(uint32_t change_id,
+ mojo::Map<mojo::String, mojo::Array<uint8_t>>
+ transport_properties) override;
// This is set once and only once when we get OnEmbed(). It gives the unique
// id for this connection.
« no previous file with comments | « components/mus/public/cpp/lib/window.cc ('k') | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698