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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2823903005: Extracts parameters to WindowTreeHostMus into structure (Closed)
Patch Set: move constructor Created 3 years, 8 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 | « ui/aura/BUILD.gn ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.cc
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index 7618729447bb5cadd74713ff2a7fb7b3017cec51..6f5956f9f4bae396b86542f3f28ea016abbcb7b1 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -44,6 +44,7 @@
#include "ui/aura/mus/window_tree_client_observer.h"
#include "ui/aura/mus/window_tree_client_test_observer.h"
#include "ui/aura/mus/window_tree_host_mus.h"
+#include "ui/aura/mus/window_tree_host_mus_init_params.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
#include "ui/aura/window_tracker.h"
@@ -116,7 +117,7 @@ class EventAckHandler : public base::MessageLoop::NestingObserver {
};
WindowTreeHostMus* GetWindowTreeHostMus(Window* window) {
- return static_cast<WindowTreeHostMus*>(window->GetRootWindow()->GetHost());
+ return WindowTreeHostMus::ForWindow(window);
}
WindowTreeHostMus* GetWindowTreeHostMus(WindowMus* window) {
@@ -465,9 +466,13 @@ std::unique_ptr<WindowTreeHostMus> WindowTreeClient::CreateWindowTreeHost(
std::unique_ptr<WindowPortMus> window_port =
CreateWindowPortMus(window_data, window_mus_type);
roots_.insert(window_port.get());
+ WindowTreeHostMusInitParams init_params;
+ init_params.window_port = std::move(window_port);
+ init_params.window_tree_client = this;
+ init_params.display_id = display_id;
+ init_params.frame_sink_id = frame_sink_id;
std::unique_ptr<WindowTreeHostMus> window_tree_host =
- base::MakeUnique<WindowTreeHostMus>(std::move(window_port), this,
- display_id, frame_sink_id);
+ base::MakeUnique<WindowTreeHostMus>(std::move(init_params));
window_tree_host->InitHost();
SetLocalPropertiesFromServerProperties(
WindowMus::Get(window_tree_host->window()), window_data);
« no previous file with comments | « ui/aura/BUILD.gn ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698