| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 mojom::MoveLoopSource source, | 160 mojom::MoveLoopSource source, |
| 161 const gfx::Point& cursor_location, | 161 const gfx::Point& cursor_location, |
| 162 const base::Callback<void(bool)>& on_done) override { | 162 const base::Callback<void(bool)>& on_done) override { |
| 163 // Don't care. | 163 // Don't care. |
| 164 } | 164 } |
| 165 void OnWmCancelMoveLoop(aura::Window* window) override {} | 165 void OnWmCancelMoveLoop(aura::Window* window) override {} |
| 166 void OnWmSetClientArea( | 166 void OnWmSetClientArea( |
| 167 aura::Window* window, | 167 aura::Window* window, |
| 168 const gfx::Insets& insets, | 168 const gfx::Insets& insets, |
| 169 const std::vector<gfx::Rect>& additional_client_areas) override {} | 169 const std::vector<gfx::Rect>& additional_client_areas) override {} |
| 170 bool IsWindowActive(aura::Window* window) override { |
| 171 // Focus client interface doesn't expose this; assume true. |
| 172 return true; |
| 173 } |
| 174 void OnWmDeactivateWindow(aura::Window* window) override { |
| 175 aura::client::GetFocusClient(root_)->FocusWindow(nullptr); |
| 176 } |
| 170 | 177 |
| 171 std::unique_ptr<display::ScreenBase> screen_; | 178 std::unique_ptr<display::ScreenBase> screen_; |
| 172 | 179 |
| 173 std::unique_ptr<aura::Env> aura_env_; | 180 std::unique_ptr<aura::Env> aura_env_; |
| 174 ::wm::WMState wm_state_; | 181 ::wm::WMState wm_state_; |
| 175 aura::PropertyConverter property_converter_; | 182 aura::PropertyConverter property_converter_; |
| 176 aura::test::TestFocusClient focus_client_; | 183 aura::test::TestFocusClient focus_client_; |
| 177 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host_; | 184 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host_; |
| 178 aura::Window* root_ = nullptr; | 185 aura::Window* root_ = nullptr; |
| 179 aura::WindowManagerClient* window_manager_client_ = nullptr; | 186 aura::WindowManagerClient* window_manager_client_ = nullptr; |
| 180 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; | 187 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; |
| 181 std::unique_ptr<ui::Gpu> gpu_; | 188 std::unique_ptr<ui::Gpu> gpu_; |
| 182 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; | 189 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; |
| 183 | 190 |
| 184 bool started_ = false; | 191 bool started_ = false; |
| 185 | 192 |
| 186 DISALLOW_COPY_AND_ASSIGN(TestWM); | 193 DISALLOW_COPY_AND_ASSIGN(TestWM); |
| 187 }; | 194 }; |
| 188 | 195 |
| 189 } // namespace test | 196 } // namespace test |
| 190 } // namespace ui | 197 } // namespace ui |
| 191 | 198 |
| 192 MojoResult ServiceMain(MojoHandle service_request_handle) { | 199 MojoResult ServiceMain(MojoHandle service_request_handle) { |
| 193 service_manager::ServiceRunner runner(new ui::test::TestWM); | 200 service_manager::ServiceRunner runner(new ui::test::TestWM); |
| 194 return runner.Run(service_request_handle); | 201 return runner.Run(service_request_handle); |
| 195 } | 202 } |
| OLD | NEW |