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

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

Issue 2692863007: Add a DCHECK to ensure that WindowTreeClient has a delegate (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698