| 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 "ui/aura/mus/window_tree_client.h" | 5 #include "ui/aura/mus/window_tree_client.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 else | 68 else |
| 69 window->Hide(); | 69 window->Hide(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool IsWindowHostVisible(Window* window) { | 72 bool IsWindowHostVisible(Window* window) { |
| 73 return window->GetRootWindow()->GetHost()->compositor()->IsVisible(); | 73 return window->GetRootWindow()->GetHost()->compositor()->IsVisible(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 // Register some test window properties for aura/mus conversion. | 76 // Register some test window properties for aura/mus conversion. |
| 77 void RegisterTestProperties(PropertyConverter* converter) { | 77 void RegisterTestProperties(PropertyConverter* converter) { |
| 78 converter->RegisterProperty(kTestPropertyKey1, kTestPropertyServerKey1); | 78 converter->RegisterProperty(kTestPropertyKey1, kTestPropertyServerKey1, |
| 79 converter->RegisterProperty(kTestPropertyKey2, kTestPropertyServerKey2); | 79 PropertyConverter::AcceptAnyValue()); |
| 80 converter->RegisterProperty(kTestPropertyKey3, kTestPropertyServerKey3); | 80 converter->RegisterProperty(kTestPropertyKey2, kTestPropertyServerKey2, |
| 81 PropertyConverter::AcceptAnyValue()); |
| 82 converter->RegisterProperty(kTestPropertyKey3, kTestPropertyServerKey3, |
| 83 PropertyConverter::AcceptAnyValue()); |
| 81 } | 84 } |
| 82 | 85 |
| 83 // Convert a primitive aura property value to a mus transport value. | 86 // Convert a primitive aura property value to a mus transport value. |
| 84 // Note that this implicitly casts arguments to the aura storage type, int64_t. | 87 // Note that this implicitly casts arguments to the aura storage type, int64_t. |
| 85 std::vector<uint8_t> ConvertToPropertyTransportValue(int64_t value) { | 88 std::vector<uint8_t> ConvertToPropertyTransportValue(int64_t value) { |
| 86 return mojo::ConvertTo<std::vector<uint8_t>>(value); | 89 return mojo::ConvertTo<std::vector<uint8_t>>(value); |
| 87 } | 90 } |
| 88 | 91 |
| 89 } // namespace | 92 } // namespace |
| 90 | 93 |
| (...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1829 window_tree()->GetEventResult(event_id)); | 1832 window_tree()->GetEventResult(event_id)); |
| 1830 EXPECT_TRUE(window_delegate1.got_move()); | 1833 EXPECT_TRUE(window_delegate1.got_move()); |
| 1831 EXPECT_FALSE(window_delegate2.got_move()); | 1834 EXPECT_FALSE(window_delegate2.got_move()); |
| 1832 gfx::Point transformed_event_location_in_dip(event_location_in_dip.x() + 20, | 1835 gfx::Point transformed_event_location_in_dip(event_location_in_dip.x() + 20, |
| 1833 event_location_in_dip.y() + 30); | 1836 event_location_in_dip.y() + 30); |
| 1834 EXPECT_EQ(transformed_event_location_in_dip, | 1837 EXPECT_EQ(transformed_event_location_in_dip, |
| 1835 window_delegate1.last_event_location()); | 1838 window_delegate1.last_event_location()); |
| 1836 } | 1839 } |
| 1837 | 1840 |
| 1838 } // namespace aura | 1841 } // namespace aura |
| OLD | NEW |