| 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 SERVICES_UI_WS_WINDOW_SERVER_TEST_BASE_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_SERVER_TEST_BASE_H_ | 
| 6 #define SERVICES_UI_WS_WINDOW_SERVER_TEST_BASE_H_ | 6 #define SERVICES_UI_WS_WINDOW_SERVER_TEST_BASE_H_ | 
| 7 | 7 | 
| 8 #include <memory> | 8 #include <memory> | 
| 9 #include <set> | 9 #include <set> | 
| 10 | 10 | 
| 11 #include "base/macros.h" | 11 #include "base/macros.h" | 
|  | 12 #include "services/service_manager/public/cpp/binder_registry.h" | 
| 12 #include "services/service_manager/public/cpp/interface_factory.h" | 13 #include "services/service_manager/public/cpp/interface_factory.h" | 
| 13 #include "services/ui/public/interfaces/window_tree.mojom.h" | 14 #include "services/ui/public/interfaces/window_tree.mojom.h" | 
| 14 #include "services/ui/ws/window_server_service_test_base.h" | 15 #include "services/ui/ws/window_server_service_test_base.h" | 
| 15 #include "ui/aura/mus/property_converter.h" | 16 #include "ui/aura/mus/property_converter.h" | 
| 16 #include "ui/aura/mus/window_manager_delegate.h" | 17 #include "ui/aura/mus/window_manager_delegate.h" | 
| 17 #include "ui/aura/mus/window_tree_client_delegate.h" | 18 #include "ui/aura/mus/window_tree_client_delegate.h" | 
| 18 #include "ui/display/screen_base.h" | 19 #include "ui/display/screen_base.h" | 
| 19 #include "ui/wm/core/wm_state.h" | 20 #include "ui/wm/core/wm_state.h" | 
| 20 | 21 | 
| 21 namespace aura { | 22 namespace aura { | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 67   // Returns the most recent WindowTreeClient that was created as the result of | 68   // Returns the most recent WindowTreeClient that was created as the result of | 
| 68   // InterfaceFactory<WindowTreeClient> being called. In other words the most | 69   // InterfaceFactory<WindowTreeClient> being called. In other words the most | 
| 69   // recent WindowTreeClient created as the result of a client embedding. | 70   // recent WindowTreeClient created as the result of a client embedding. | 
| 70   std::unique_ptr<aura::WindowTreeClient> ReleaseMostRecentClient(); | 71   std::unique_ptr<aura::WindowTreeClient> ReleaseMostRecentClient(); | 
| 71 | 72 | 
| 72   // testing::Test: | 73   // testing::Test: | 
| 73   void SetUp() override; | 74   void SetUp() override; | 
| 74   void TearDown() override; | 75   void TearDown() override; | 
| 75 | 76 | 
| 76   // WindowServerServiceTestBase: | 77   // WindowServerServiceTestBase: | 
| 77   bool OnConnect(const service_manager::Identity& remote_identity, | 78   void OnBindInterface(const service_manager::ServiceInfo& source_info, | 
| 78                  service_manager::InterfaceRegistry* registry) override; | 79                        const std::string& interface_name, | 
|  | 80                        mojo::ScopedMessagePipeHandle interface_pipe) override; | 
| 79 | 81 | 
| 80   // WindowTreeClientDelegate: | 82   // WindowTreeClientDelegate: | 
| 81   void OnEmbed( | 83   void OnEmbed( | 
| 82       std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; | 84       std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; | 
| 83   void OnLostConnection(aura::WindowTreeClient* client) override; | 85   void OnLostConnection(aura::WindowTreeClient* client) override; | 
| 84   void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override; | 86   void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override; | 
| 85   void OnPointerEventObserved(const ui::PointerEvent& event, | 87   void OnPointerEventObserved(const ui::PointerEvent& event, | 
| 86                               aura::Window* target) override; | 88                               aura::Window* target) override; | 
| 87   aura::PropertyConverter* GetPropertyConverter() override; | 89   aura::PropertyConverter* GetPropertyConverter() override; | 
| 88 | 90 | 
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 152   aura::WindowTreeClient* window_manager_ = nullptr; | 154   aura::WindowTreeClient* window_manager_ = nullptr; | 
| 153 | 155 | 
| 154   // A test can override the WM-related behaviour by installing its own | 156   // A test can override the WM-related behaviour by installing its own | 
| 155   // WindowManagerDelegate during the test. | 157   // WindowManagerDelegate during the test. | 
| 156   aura::WindowManagerDelegate* window_manager_delegate_ = nullptr; | 158   aura::WindowManagerDelegate* window_manager_delegate_ = nullptr; | 
| 157 | 159 | 
| 158   aura::WindowManagerClient* window_manager_client_ = nullptr; | 160   aura::WindowManagerClient* window_manager_client_ = nullptr; | 
| 159 | 161 | 
| 160   bool window_tree_client_lost_connection_ = false; | 162   bool window_tree_client_lost_connection_ = false; | 
| 161 | 163 | 
|  | 164   service_manager::BinderRegistry registry_; | 
|  | 165 | 
| 162   DISALLOW_COPY_AND_ASSIGN(WindowServerTestBase); | 166   DISALLOW_COPY_AND_ASSIGN(WindowServerTestBase); | 
| 163 }; | 167 }; | 
| 164 | 168 | 
| 165 }  // namespace ui | 169 }  // namespace ui | 
| 166 | 170 | 
| 167 #endif  // SERVICES_UI_WS_WINDOW_SERVER_TEST_BASE_H_ | 171 #endif  // SERVICES_UI_WS_WINDOW_SERVER_TEST_BASE_H_ | 
| OLD | NEW | 
|---|