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

Side by Side Diff: ui/aura/mus/window_tree_client.cc

Issue 2755673003: Allow parallel creation of windows
Patch Set: nits 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 unified diff | Download patch
« no previous file with comments | « services/ui/demo/window_tree_data.cc ('k') | ui/aura/mus/window_tree_client_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/mus/window_tree_client.h" 5 #include "ui/aura/mus/window_tree_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 DCHECK(tree_ptr_); 873 DCHECK(tree_ptr_);
874 DCHECK(!tree); 874 DCHECK(!tree);
875 875
876 auto it = windows_.find(focused_window_id); 876 auto it = windows_.find(focused_window_id);
877 DCHECK(it != windows_.end()); 877 DCHECK(it != windows_.end());
878 878
879 WindowTreeHostMus* window_tree_host = GetWindowTreeHostMus(it->second); 879 WindowTreeHostMus* window_tree_host = GetWindowTreeHostMus(it->second);
880 window_tree_host->InitHost(); 880 window_tree_host->InitHost();
881 ConfigureWindowDataFromServer(window_tree_host, *root_data); 881 ConfigureWindowDataFromServer(window_tree_host, *root_data);
882 882
883 // TODO(tonikitoo): Fix the WindowTreeClientDelegate::OnEmbed API. 883 // Pass a raw pointer to WindowTreeHostMus, which helps delegate to identify
884 // In external window mode, this needs not to pass the ownership of the 884 // which WindowTreeHostMus to use in case if there are many of them.
885 // WindowTreeHostMus instance to the delegate_. A raw pointer should 885 delegate_->OnEmbedRootReady(window_tree_host);
886 // surface.
887 delegate_->OnEmbed(nullptr);
888 return; 886 return;
889 } 887 }
890 888
891 DCHECK(!tree_ptr_); 889 DCHECK(!tree_ptr_);
892 DCHECK(tree); 890 DCHECK(tree);
893 tree_ptr_ = std::move(tree); 891 tree_ptr_ = std::move(tree);
894 892
895 is_from_embed_ = true; 893 is_from_embed_ = true;
896 894
897 if (window_manager_delegate_) { 895 if (window_manager_delegate_) {
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1881 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1879 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1882 this, capture_synchronizer_.get(), window)); 1880 this, capture_synchronizer_.get(), window));
1883 } 1881 }
1884 1882
1885 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1883 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1886 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1884 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1887 this, focus_synchronizer_.get(), window)); 1885 this, focus_synchronizer_.get(), window));
1888 } 1886 }
1889 1887
1890 } // namespace aura 1888 } // namespace aura
OLDNEW
« no previous file with comments | « services/ui/demo/window_tree_data.cc ('k') | ui/aura/mus/window_tree_client_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698