OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "components/mus/common/types.h" | 13 #include "components/mus/common/types.h" |
14 #include "components/mus/common/util.h" | 14 #include "components/mus/common/util.h" |
15 #include "components/mus/public/interfaces/window_tree.mojom.h" | 15 #include "components/mus/public/interfaces/window_tree.mojom.h" |
16 #include "components/mus/surfaces/surfaces_state.h" | 16 #include "components/mus/surfaces/surfaces_state.h" |
17 #include "components/mus/ws/client_connection.h" | 17 #include "components/mus/ws/client_connection.h" |
18 #include "components/mus/ws/connection_manager.h" | 18 #include "components/mus/ws/connection_manager.h" |
19 #include "components/mus/ws/connection_manager_delegate.h" | 19 #include "components/mus/ws/connection_manager_delegate.h" |
20 #include "components/mus/ws/display_manager.h" | 20 #include "components/mus/ws/display_manager.h" |
21 #include "components/mus/ws/display_manager_factory.h" | 21 #include "components/mus/ws/display_manager_factory.h" |
22 #include "components/mus/ws/ids.h" | 22 #include "components/mus/ws/ids.h" |
23 #include "components/mus/ws/server_window.h" | 23 #include "components/mus/ws/server_window.h" |
24 #include "components/mus/ws/server_window_surface_manager_test_api.h" | 24 #include "components/mus/ws/server_window_surface_manager_test_api.h" |
25 #include "components/mus/ws/test_change_tracker.h" | 25 #include "components/mus/ws/test_change_tracker.h" |
26 #include "components/mus/ws/window_tree_host_connection.h" | 26 #include "components/mus/ws/window_tree_host_connection.h" |
27 #include "components/mus/ws/window_tree_impl.h" | 27 #include "components/mus/ws/window_tree_impl.h" |
28 #include "mojo/converters/geometry/geometry_type_converters.h" | 28 #include "mojo/converters/geometry/geometry_type_converters.h" |
29 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 29 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
30 #include "mojo/shell/public/interfaces/service_provider.mojom.h" | |
31 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
32 #include "ui/events/event.h" | 31 #include "ui/events/event.h" |
33 #include "ui/events/event_utils.h" | 32 #include "ui/events/event_utils.h" |
34 #include "ui/gfx/geometry/rect.h" | 33 #include "ui/gfx/geometry/rect.h" |
35 | 34 |
36 using mojo::Array; | 35 using mojo::Array; |
37 using mojo::InterfaceRequest; | 36 using mojo::InterfaceRequest; |
38 using mojo::String; | 37 using mojo::String; |
39 using mus::mojom::Event; | 38 using mus::mojom::Event; |
40 using mus::mojom::EventPtr; | 39 using mus::mojom::EventPtr; |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 DISALLOW_COPY_AND_ASSIGN(TestDisplayManager); | 339 DISALLOW_COPY_AND_ASSIGN(TestDisplayManager); |
341 }; | 340 }; |
342 | 341 |
343 // Factory that dispenses TestDisplayManagers. | 342 // Factory that dispenses TestDisplayManagers. |
344 class TestDisplayManagerFactory : public DisplayManagerFactory { | 343 class TestDisplayManagerFactory : public DisplayManagerFactory { |
345 public: | 344 public: |
346 explicit TestDisplayManagerFactory(int32_t* cursor_id_storage) | 345 explicit TestDisplayManagerFactory(int32_t* cursor_id_storage) |
347 : cursor_id_storage_(cursor_id_storage) {} | 346 : cursor_id_storage_(cursor_id_storage) {} |
348 ~TestDisplayManagerFactory() {} | 347 ~TestDisplayManagerFactory() {} |
349 DisplayManager* CreateDisplayManager( | 348 DisplayManager* CreateDisplayManager( |
350 mojo::ApplicationImpl* app_impl, | 349 mojo::Shell* shell, |
351 const scoped_refptr<GpuState>& gpu_state, | 350 const scoped_refptr<GpuState>& gpu_state, |
352 const scoped_refptr<mus::SurfacesState>& surfaces_state) override { | 351 const scoped_refptr<mus::SurfacesState>& surfaces_state) override { |
353 return new TestDisplayManager(cursor_id_storage_); | 352 return new TestDisplayManager(cursor_id_storage_); |
354 } | 353 } |
355 | 354 |
356 private: | 355 private: |
357 int32_t* cursor_id_storage_; | 356 int32_t* cursor_id_storage_; |
358 | 357 |
359 DISALLOW_COPY_AND_ASSIGN(TestDisplayManagerFactory); | 358 DISALLOW_COPY_AND_ASSIGN(TestDisplayManagerFactory); |
360 }; | 359 }; |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 SingleChangeToDescription(*embed_connection->tracker()->changes())); | 890 SingleChangeToDescription(*embed_connection->tracker()->changes())); |
892 | 891 |
893 // Set the visibility from the child using the client assigned id. | 892 // Set the visibility from the child using the client assigned id. |
894 ASSERT_TRUE(window_tree_connection->SetWindowVisibility( | 893 ASSERT_TRUE(window_tree_connection->SetWindowVisibility( |
895 embed_window_id2_in_child, false)); | 894 embed_window_id2_in_child, false)); |
896 EXPECT_FALSE(embed_window->visible()); | 895 EXPECT_FALSE(embed_window->visible()); |
897 } | 896 } |
898 | 897 |
899 } // namespace ws | 898 } // namespace ws |
900 } // namespace mus | 899 } // namespace mus |
OLD | NEW |