| 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 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "components/mus/public/cpp/tests/window_server_shelltest_base.h" | 11 #include "components/mus/public/cpp/tests/window_server_shelltest_base.h" |
| 11 #include "components/mus/public/cpp/window_manager_delegate.h" | 12 #include "components/mus/public/cpp/window_manager_delegate.h" |
| 12 #include "components/mus/public/cpp/window_tree_delegate.h" | 13 #include "components/mus/public/cpp/window_tree_delegate.h" |
| 13 #include "components/mus/public/interfaces/window_tree.mojom.h" | 14 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 14 #include "components/mus/public/interfaces/window_tree_host.mojom.h" | 15 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
| 15 #include "services/shell/public/cpp/interface_factory.h" | 16 #include "services/shell/public/cpp/interface_factory.h" |
| 16 | 17 |
| 17 namespace mus { | 18 namespace mus { |
| 18 | 19 |
| 19 // WindowServerTestBase is a base class for use with shell tests that use | 20 // WindowServerTestBase is a base class for use with shell tests that use |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // WindowServerShellTestBase: | 65 // WindowServerShellTestBase: |
| 65 bool AcceptConnection(shell::Connection* connection) override; | 66 bool AcceptConnection(shell::Connection* connection) override; |
| 66 | 67 |
| 67 // WindowTreeDelegate: | 68 // WindowTreeDelegate: |
| 68 void OnEmbed(Window* root) override; | 69 void OnEmbed(Window* root) override; |
| 69 void OnConnectionLost(WindowTreeConnection* connection) override; | 70 void OnConnectionLost(WindowTreeConnection* connection) override; |
| 70 | 71 |
| 71 // WindowManagerDelegate: | 72 // WindowManagerDelegate: |
| 72 void SetWindowManagerClient(WindowManagerClient* client) override; | 73 void SetWindowManagerClient(WindowManagerClient* client) override; |
| 73 bool OnWmSetBounds(Window* window, gfx::Rect* bounds) override; | 74 bool OnWmSetBounds(Window* window, gfx::Rect* bounds) override; |
| 74 bool OnWmSetProperty(Window* window, | 75 bool OnWmSetProperty( |
| 75 const std::string& name, | 76 Window* window, |
| 76 scoped_ptr<std::vector<uint8_t>>* new_data) override; | 77 const std::string& name, |
| 78 std::unique_ptr<std::vector<uint8_t>>* new_data) override; |
| 77 Window* OnWmCreateTopLevelWindow( | 79 Window* OnWmCreateTopLevelWindow( |
| 78 std::map<std::string, std::vector<uint8_t>>* properties) override; | 80 std::map<std::string, std::vector<uint8_t>>* properties) override; |
| 79 void OnAccelerator(uint32_t id, const ui::Event& event) override; | 81 void OnAccelerator(uint32_t id, const ui::Event& event) override; |
| 80 | 82 |
| 81 // InterfaceFactory<WindowTreeClient>: | 83 // InterfaceFactory<WindowTreeClient>: |
| 82 void Create(shell::Connection* connection, | 84 void Create(shell::Connection* connection, |
| 83 mojo::InterfaceRequest<mojom::WindowTreeClient> request) override; | 85 mojo::InterfaceRequest<mojom::WindowTreeClient> request) override; |
| 84 | 86 |
| 85 // Used to receive the most recent window tree connection loaded by an embed | 87 // Used to receive the most recent window tree connection loaded by an embed |
| 86 // action. | 88 // action. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 100 WindowManagerClient* window_manager_client_; | 102 WindowManagerClient* window_manager_client_; |
| 101 | 103 |
| 102 bool window_tree_connection_destroyed_; | 104 bool window_tree_connection_destroyed_; |
| 103 | 105 |
| 104 DISALLOW_COPY_AND_ASSIGN(WindowServerTestBase); | 106 DISALLOW_COPY_AND_ASSIGN(WindowServerTestBase); |
| 105 }; | 107 }; |
| 106 | 108 |
| 107 } // namespace mus | 109 } // namespace mus |
| 108 | 110 |
| 109 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 111 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
| OLD | NEW |