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

Unified Diff: services/ui/demo/window_tree_data.cc

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/demo/window_tree_data.cc
diff --git a/services/ui/demo/window_tree_data.cc b/services/ui/demo/window_tree_data.cc
index 3d78c94df668343d7eb38d73ca32305ff5fd923c..65055a8a6dfe65f1b10cba3f2f625bbb9d0fcde5 100644
--- a/services/ui/demo/window_tree_data.cc
+++ b/services/ui/demo/window_tree_data.cc
@@ -68,10 +68,11 @@ aura::Window* WindowTreeData::bitmap_window() {
void WindowTreeData::Init(
std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) {
- window_tree_host->InitHost();
- window_tree_host->Show();
- // Take ownership of the WTH.
- window_tree_host_ = std::move(window_tree_host);
+ if (window_tree_host) {
kylechar 2017/03/07 18:19:36 When would |window_tree_host| be null?
tonikitoo 2017/03/07 20:09:36 Before this CL, all the ws::Display creation happe
+ window_tree_host->InitHost();
+ window_tree_host->Show();
+ SetWindowTreeHost(std::move(window_tree_host));
+ }
// Initialize the window for the bitmap.
window_delegate_ = new aura_extra::ImageWindowDelegate();

Powered by Google App Engine
This is Rietveld 408576698