| 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 "components/mus/public/cpp/tests/window_server_test_base.h" | 5 #include "components/mus/public/cpp/tests/window_server_test_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 bool WindowServerTestBase::OnWmSetBounds(Window* window, gfx::Rect* bounds) { | 94 bool WindowServerTestBase::OnWmSetBounds(Window* window, gfx::Rect* bounds) { |
| 95 return window_manager_delegate_ | 95 return window_manager_delegate_ |
| 96 ? window_manager_delegate_->OnWmSetBounds(window, bounds) | 96 ? window_manager_delegate_->OnWmSetBounds(window, bounds) |
| 97 : true; | 97 : true; |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool WindowServerTestBase::OnWmSetProperty( | 100 bool WindowServerTestBase::OnWmSetProperty( |
| 101 Window* window, | 101 Window* window, |
| 102 const std::string& name, | 102 const std::string& name, |
| 103 scoped_ptr<std::vector<uint8_t>>* new_data) { | 103 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| 104 return window_manager_delegate_ | 104 return window_manager_delegate_ |
| 105 ? window_manager_delegate_->OnWmSetProperty(window, name, new_data) | 105 ? window_manager_delegate_->OnWmSetProperty(window, name, new_data) |
| 106 : true; | 106 : true; |
| 107 } | 107 } |
| 108 | 108 |
| 109 Window* WindowServerTestBase::OnWmCreateTopLevelWindow( | 109 Window* WindowServerTestBase::OnWmCreateTopLevelWindow( |
| 110 std::map<std::string, std::vector<uint8_t>>* properties) { | 110 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 111 return window_manager_delegate_ | 111 return window_manager_delegate_ |
| 112 ? window_manager_delegate_->OnWmCreateTopLevelWindow(properties) | 112 ? window_manager_delegate_->OnWmCreateTopLevelWindow(properties) |
| 113 : nullptr; | 113 : nullptr; |
| 114 } | 114 } |
| 115 | 115 |
| 116 void WindowServerTestBase::OnAccelerator(uint32_t id, const ui::Event& event) { | 116 void WindowServerTestBase::OnAccelerator(uint32_t id, const ui::Event& event) { |
| 117 if (window_manager_delegate_) | 117 if (window_manager_delegate_) |
| 118 window_manager_delegate_->OnAccelerator(id, event); | 118 window_manager_delegate_->OnAccelerator(id, event); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void WindowServerTestBase::Create( | 121 void WindowServerTestBase::Create( |
| 122 shell::Connection* connection, | 122 shell::Connection* connection, |
| 123 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { | 123 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { |
| 124 WindowTreeConnection::Create( | 124 WindowTreeConnection::Create( |
| 125 this, std::move(request), | 125 this, std::move(request), |
| 126 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); | 126 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace mus | 129 } // namespace mus |
| OLD | NEW |