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/lib/window_tree_client_impl.h" | 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" |
8 #include "components/mus/common/util.h" | 11 #include "components/mus/common/util.h" |
9 #include "components/mus/public/cpp/input_event_handler.h" | 12 #include "components/mus/public/cpp/input_event_handler.h" |
10 #include "components/mus/public/cpp/lib/window_private.h" | 13 #include "components/mus/public/cpp/lib/window_private.h" |
11 #include "components/mus/public/cpp/property_type_converters.h" | 14 #include "components/mus/public/cpp/property_type_converters.h" |
12 #include "components/mus/public/cpp/tests/test_window.h" | 15 #include "components/mus/public/cpp/tests/test_window.h" |
13 #include "components/mus/public/cpp/tests/test_window_tree.h" | 16 #include "components/mus/public/cpp/tests/test_window_tree.h" |
14 #include "components/mus/public/cpp/window.h" | 17 #include "components/mus/public/cpp/window.h" |
15 #include "components/mus/public/cpp/window_observer.h" | 18 #include "components/mus/public/cpp/window_observer.h" |
16 #include "components/mus/public/cpp/window_property.h" | 19 #include "components/mus/public/cpp/window_property.h" |
17 #include "components/mus/public/cpp/window_tree_delegate.h" | 20 #include "components/mus/public/cpp/window_tree_delegate.h" |
(...skipping 27 matching lines...) Expand all Loading... |
45 private: | 48 private: |
46 DISALLOW_COPY_AND_ASSIGN(TestWindowTreeDelegate); | 49 DISALLOW_COPY_AND_ASSIGN(TestWindowTreeDelegate); |
47 }; | 50 }; |
48 | 51 |
49 class WindowTreeClientImplPrivate { | 52 class WindowTreeClientImplPrivate { |
50 public: | 53 public: |
51 WindowTreeClientImplPrivate(WindowTreeClientImpl* tree_client_impl) | 54 WindowTreeClientImplPrivate(WindowTreeClientImpl* tree_client_impl) |
52 : tree_client_impl_(tree_client_impl) {} | 55 : tree_client_impl_(tree_client_impl) {} |
53 ~WindowTreeClientImplPrivate() {} | 56 ~WindowTreeClientImplPrivate() {} |
54 | 57 |
55 void Init(mojom::WindowTree* window_tree, uint32 access_policy) { | 58 void Init(mojom::WindowTree* window_tree, uint32_t access_policy) { |
56 mojom::WindowDataPtr root_data(mojom::WindowData::New()); | 59 mojom::WindowDataPtr root_data(mojom::WindowData::New()); |
57 root_data->parent_id = 0; | 60 root_data->parent_id = 0; |
58 root_data->window_id = 1; | 61 root_data->window_id = 1; |
59 root_data->bounds = mojo::Rect::From(gfx::Rect()); | 62 root_data->bounds = mojo::Rect::From(gfx::Rect()); |
60 root_data->properties.mark_non_null(); | 63 root_data->properties.mark_non_null(); |
61 root_data->visible = true; | 64 root_data->visible = true; |
62 root_data->drawn = true; | 65 root_data->drawn = true; |
63 root_data->viewport_metrics = mojom::ViewportMetrics::New(); | 66 root_data->viewport_metrics = mojom::ViewportMetrics::New(); |
64 root_data->viewport_metrics->size_in_pixels = | 67 root_data->viewport_metrics->size_in_pixels = |
65 mojo::Size::From(gfx::Size(1000, 1000)); | 68 mojo::Size::From(gfx::Size(1000, 1000)); |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 // ToggleVisibilityFromDestroyedObserver::OnWindowDestroyed(), which toggles | 480 // ToggleVisibilityFromDestroyedObserver::OnWindowDestroyed(), which toggles |
478 // the visibility of the window. Ack the change, which should not crash or | 481 // the visibility of the window. Ack the change, which should not crash or |
479 // trigger DCHECKs. | 482 // trigger DCHECKs. |
480 child1->Destroy(); | 483 child1->Destroy(); |
481 uint32_t change_id; | 484 uint32_t change_id; |
482 ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id)); | 485 ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id)); |
483 setup.window_tree_client()->OnChangeCompleted(change_id, true); | 486 setup.window_tree_client()->OnChangeCompleted(change_id, true); |
484 } | 487 } |
485 | 488 |
486 } // namespace mus | 489 } // namespace mus |
OLD | NEW |