| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 else | 66 else |
| 67 window->Hide(); | 67 window->Hide(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool IsWindowHostVisible(Window* window) { | 70 bool IsWindowHostVisible(Window* window) { |
| 71 return window->GetRootWindow()->GetHost()->compositor()->IsVisible(); | 71 return window->GetRootWindow()->GetHost()->compositor()->IsVisible(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 // Register some test window properties for aura/mus conversion. | 74 // Register some test window properties for aura/mus conversion. |
| 75 void RegisterTestProperties(PropertyConverter* converter) { | 75 void RegisterTestProperties(PropertyConverter* converter) { |
| 76 converter->RegisterProperty(kTestPropertyKey1, kTestPropertyServerKey1); | 76 converter->RegisterProperty( |
| 77 converter->RegisterProperty(kTestPropertyKey2, kTestPropertyServerKey2); | 77 kTestPropertyKey1, kTestPropertyServerKey1, |
| 78 converter->RegisterProperty(kTestPropertyKey3, kTestPropertyServerKey3); | 78 PropertyConverter::CreateAcceptAnyValueCallback()); |
| 79 converter->RegisterProperty( |
| 80 kTestPropertyKey2, kTestPropertyServerKey2, |
| 81 PropertyConverter::CreateAcceptAnyValueCallback()); |
| 82 converter->RegisterProperty( |
| 83 kTestPropertyKey3, kTestPropertyServerKey3, |
| 84 PropertyConverter::CreateAcceptAnyValueCallback()); |
| 79 } | 85 } |
| 80 | 86 |
| 81 // Convert a primitive aura property value to a mus transport value. | 87 // Convert a primitive aura property value to a mus transport value. |
| 82 // Note that this implicitly casts arguments to the aura storage type, int64_t. | 88 // Note that this implicitly casts arguments to the aura storage type, int64_t. |
| 83 std::vector<uint8_t> ConvertToPropertyTransportValue(int64_t value) { | 89 std::vector<uint8_t> ConvertToPropertyTransportValue(int64_t value) { |
| 84 return mojo::ConvertTo<std::vector<uint8_t>>(value); | 90 return mojo::ConvertTo<std::vector<uint8_t>>(value); |
| 85 } | 91 } |
| 86 | 92 |
| 87 } // namespace | 93 } // namespace |
| 88 | 94 |
| (...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 // Delegate received the event in Dips. | 1622 // Delegate received the event in Dips. |
| 1617 const ui::PointerEvent* last_event = last_event_observed(); | 1623 const ui::PointerEvent* last_event = last_event_observed(); |
| 1618 ASSERT_TRUE(last_event); | 1624 ASSERT_TRUE(last_event); |
| 1619 EXPECT_EQ(gfx::ConvertPointToDIP(2.0f, location_pixels), | 1625 EXPECT_EQ(gfx::ConvertPointToDIP(2.0f, location_pixels), |
| 1620 last_event->location()); | 1626 last_event->location()); |
| 1621 EXPECT_EQ(gfx::ConvertPointToDIP(2.0f, root_location_pixels), | 1627 EXPECT_EQ(gfx::ConvertPointToDIP(2.0f, root_location_pixels), |
| 1622 last_event->root_location()); | 1628 last_event->root_location()); |
| 1623 } | 1629 } |
| 1624 | 1630 |
| 1625 } // namespace aura | 1631 } // namespace aura |
| OLD | NEW |