| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 bool WindowServerTestBase::OnWmSetProperty( | 162 bool WindowServerTestBase::OnWmSetProperty( |
| 163 aura::Window* window, | 163 aura::Window* window, |
| 164 const std::string& name, | 164 const std::string& name, |
| 165 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 165 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| 166 return window_manager_delegate_ | 166 return window_manager_delegate_ |
| 167 ? window_manager_delegate_->OnWmSetProperty(window, name, new_data) | 167 ? window_manager_delegate_->OnWmSetProperty(window, name, new_data) |
| 168 : true; | 168 : true; |
| 169 } | 169 } |
| 170 | 170 |
| 171 void WindowServerTestBase::OnWmSetModalType(aura::Window* window, |
| 172 ui::ModalType type) { |
| 173 if (window_manager_delegate_) |
| 174 window_manager_delegate_->OnWmSetModalType(window, type); |
| 175 } |
| 176 |
| 171 void WindowServerTestBase::OnWmSetCanFocus(aura::Window* window, | 177 void WindowServerTestBase::OnWmSetCanFocus(aura::Window* window, |
| 172 bool can_focus) { | 178 bool can_focus) { |
| 173 if (window_manager_delegate_) | 179 if (window_manager_delegate_) |
| 174 window_manager_delegate_->OnWmSetCanFocus(window, can_focus); | 180 window_manager_delegate_->OnWmSetCanFocus(window, can_focus); |
| 175 } | 181 } |
| 176 | 182 |
| 177 aura::Window* WindowServerTestBase::OnWmCreateTopLevelWindow( | 183 aura::Window* WindowServerTestBase::OnWmCreateTopLevelWindow( |
| 178 ui::mojom::WindowType window_type, | 184 ui::mojom::WindowType window_type, |
| 179 std::map<std::string, std::vector<uint8_t>>* properties) { | 185 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 180 return window_manager_delegate_ | 186 return window_manager_delegate_ |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 ++iter) { | 289 ++iter) { |
| 284 if ((*iter).get() == window_tree_host) { | 290 if ((*iter).get() == window_tree_host) { |
| 285 window_tree_hosts_.erase(iter); | 291 window_tree_hosts_.erase(iter); |
| 286 return true; | 292 return true; |
| 287 } | 293 } |
| 288 } | 294 } |
| 289 return false; | 295 return false; |
| 290 } | 296 } |
| 291 | 297 |
| 292 } // namespace ui | 298 } // namespace ui |
| OLD | NEW |