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

Side by Side Diff: services/ui/public/cpp/tests/window_server_test_base.cc

Issue 2346253004: Makes display roots be destroyed by client (Closed)
Patch Set: cleanup Created 4 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/public/cpp/tests/window_server_test_base.h" 5 #include "services/ui/public/cpp/tests/window_server_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (window_manager_delegate_) 146 if (window_manager_delegate_)
147 window_manager_delegate_->OnWmClientJankinessChanged(client_windows, janky); 147 window_manager_delegate_->OnWmClientJankinessChanged(client_windows, janky);
148 } 148 }
149 149
150 void WindowServerTestBase::OnWmNewDisplay(Window* window, 150 void WindowServerTestBase::OnWmNewDisplay(Window* window,
151 const display::Display& display) { 151 const display::Display& display) {
152 if (window_manager_delegate_) 152 if (window_manager_delegate_)
153 window_manager_delegate_->OnWmNewDisplay(window, display); 153 window_manager_delegate_->OnWmNewDisplay(window, display);
154 } 154 }
155 155
156 void WindowServerTestBase::OnWmDisplayRemoved(Window* window) {
157 if (window_manager_delegate_)
158 window_manager_delegate_->OnWmDisplayRemoved(window);
159 }
160
156 void WindowServerTestBase::OnWmPerformMoveLoop( 161 void WindowServerTestBase::OnWmPerformMoveLoop(
157 Window* window, 162 Window* window,
158 mojom::MoveLoopSource source, 163 mojom::MoveLoopSource source,
159 const gfx::Point& cursor_location, 164 const gfx::Point& cursor_location,
160 const base::Callback<void(bool)>& on_done) { 165 const base::Callback<void(bool)>& on_done) {
161 if (window_manager_delegate_) { 166 if (window_manager_delegate_) {
162 window_manager_delegate_->OnWmPerformMoveLoop(window, source, 167 window_manager_delegate_->OnWmPerformMoveLoop(window, source,
163 cursor_location, on_done); 168 cursor_location, on_done);
164 } 169 }
165 } 170 }
(...skipping 10 matching lines...) Expand all
176 : mojom::EventResult::UNHANDLED; 181 : mojom::EventResult::UNHANDLED;
177 } 182 }
178 183
179 void WindowServerTestBase::Create(const shell::Identity& remote_identity, 184 void WindowServerTestBase::Create(const shell::Identity& remote_identity,
180 mojom::WindowTreeClientRequest request) { 185 mojom::WindowTreeClientRequest request) {
181 window_tree_clients_.insert( 186 window_tree_clients_.insert(
182 base::MakeUnique<WindowTreeClient>(this, nullptr, std::move(request))); 187 base::MakeUnique<WindowTreeClient>(this, nullptr, std::move(request)));
183 } 188 }
184 189
185 } // namespace ui 190 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/tests/window_server_test_base.h ('k') | services/ui/public/cpp/window_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698