OLD | NEW |
---|---|
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 : connector_(connector), | 171 : connector_(connector), |
172 client_id_(0), | 172 client_id_(0), |
173 next_window_id_(1), | 173 next_window_id_(1), |
174 next_change_id_(1), | 174 next_change_id_(1), |
175 delegate_(delegate), | 175 delegate_(delegate), |
176 window_manager_delegate_(window_manager_delegate), | 176 window_manager_delegate_(window_manager_delegate), |
177 binding_(this), | 177 binding_(this), |
178 tree_(nullptr), | 178 tree_(nullptr), |
179 in_destructor_(false), | 179 in_destructor_(false), |
180 weak_factory_(this) { | 180 weak_factory_(this) { |
181 DCHECK(delegate_); | |
tonikitoo
2017/02/17 17:10:28
alternatively, we could make 'delegate_' a referen
| |
181 // Allow for a null request in tests. | 182 // Allow for a null request in tests. |
182 if (request.is_pending()) | 183 if (request.is_pending()) |
183 binding_.Bind(std::move(request)); | 184 binding_.Bind(std::move(request)); |
184 client::GetTransientWindowClient()->AddObserver(this); | 185 client::GetTransientWindowClient()->AddObserver(this); |
185 if (window_manager_delegate) | 186 if (window_manager_delegate) |
186 window_manager_delegate->SetWindowManagerClient(this); | 187 window_manager_delegate->SetWindowManagerClient(this); |
187 if (connector) { // |connector| can be null in tests. | 188 if (connector) { // |connector| can be null in tests. |
188 gpu_ = ui::Gpu::Create(connector, std::move(io_task_runner)); | 189 gpu_ = ui::Gpu::Create(connector, std::move(io_task_runner)); |
189 compositor_context_factory_ = | 190 compositor_context_factory_ = |
190 base::MakeUnique<MusContextFactory>(gpu_.get()); | 191 base::MakeUnique<MusContextFactory>(gpu_.get()); |
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1840 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1841 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1841 this, capture_synchronizer_.get(), window)); | 1842 this, capture_synchronizer_.get(), window)); |
1842 } | 1843 } |
1843 | 1844 |
1844 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1845 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1845 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1846 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1846 this, focus_synchronizer_.get(), window)); | 1847 this, focus_synchronizer_.get(), window)); |
1847 } | 1848 } |
1848 | 1849 |
1849 } // namespace aura | 1850 } // namespace aura |
OLD | NEW |