| OLD | NEW |
| 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/ws/window_server_test_base.h" | 5 #include "services/ui/ws/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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 bool WindowServerTestBase::OnWmSetProperty( | 166 bool WindowServerTestBase::OnWmSetProperty( |
| 167 aura::Window* window, | 167 aura::Window* window, |
| 168 const std::string& name, | 168 const std::string& name, |
| 169 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 169 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| 170 return window_manager_delegate_ | 170 return window_manager_delegate_ |
| 171 ? window_manager_delegate_->OnWmSetProperty(window, name, new_data) | 171 ? window_manager_delegate_->OnWmSetProperty(window, name, new_data) |
| 172 : true; | 172 : true; |
| 173 } | 173 } |
| 174 | 174 |
| 175 void WindowServerTestBase::OnWmSetCanFocus(aura::Window* window, |
| 176 bool can_focus) { |
| 177 if (window_manager_delegate_) |
| 178 window_manager_delegate_->OnWmSetCanFocus(window, can_focus); |
| 179 } |
| 180 |
| 175 aura::Window* WindowServerTestBase::OnWmCreateTopLevelWindow( | 181 aura::Window* WindowServerTestBase::OnWmCreateTopLevelWindow( |
| 176 ui::mojom::WindowType window_type, | 182 ui::mojom::WindowType window_type, |
| 177 std::map<std::string, std::vector<uint8_t>>* properties) { | 183 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 178 return window_manager_delegate_ | 184 return window_manager_delegate_ |
| 179 ? window_manager_delegate_->OnWmCreateTopLevelWindow(window_type, | 185 ? window_manager_delegate_->OnWmCreateTopLevelWindow(window_type, |
| 180 properties) | 186 properties) |
| 181 : nullptr; | 187 : nullptr; |
| 182 } | 188 } |
| 183 | 189 |
| 184 void WindowServerTestBase::OnWmClientJankinessChanged( | 190 void WindowServerTestBase::OnWmClientJankinessChanged( |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 ++iter) { | 285 ++iter) { |
| 280 if ((*iter).get() == window_tree_host) { | 286 if ((*iter).get() == window_tree_host) { |
| 281 window_tree_hosts_.erase(iter); | 287 window_tree_hosts_.erase(iter); |
| 282 return true; | 288 return true; |
| 283 } | 289 } |
| 284 } | 290 } |
| 285 return false; | 291 return false; |
| 286 } | 292 } |
| 287 | 293 |
| 288 } // namespace ui | 294 } // namespace ui |
| OLD | NEW |