| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 else | 75 else |
| 76 window->Hide(); | 76 window->Hide(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 bool IsWindowHostVisible(Window* window) { | 79 bool IsWindowHostVisible(Window* window) { |
| 80 return window->GetRootWindow()->GetHost()->compositor()->IsVisible(); | 80 return window->GetRootWindow()->GetHost()->compositor()->IsVisible(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 // Register some test window properties for aura/mus conversion. | 83 // Register some test window properties for aura/mus conversion. |
| 84 void RegisterTestProperties(PropertyConverter* converter) { | 84 void RegisterTestProperties(PropertyConverter* converter) { |
| 85 converter->RegisterProperty( | 85 converter->RegisterPrimitiveProperty( |
| 86 kTestPropertyKey1, kTestPropertyServerKey1, | 86 kTestPropertyKey1, kTestPropertyServerKey1, |
| 87 PropertyConverter::CreateAcceptAnyValueCallback()); | 87 PropertyConverter::CreateAcceptAnyValueCallback()); |
| 88 converter->RegisterProperty( | 88 converter->RegisterPrimitiveProperty( |
| 89 kTestPropertyKey2, kTestPropertyServerKey2, | 89 kTestPropertyKey2, kTestPropertyServerKey2, |
| 90 PropertyConverter::CreateAcceptAnyValueCallback()); | 90 PropertyConverter::CreateAcceptAnyValueCallback()); |
| 91 converter->RegisterProperty( | 91 converter->RegisterPrimitiveProperty( |
| 92 kTestPropertyKey3, kTestPropertyServerKey3, | 92 kTestPropertyKey3, kTestPropertyServerKey3, |
| 93 PropertyConverter::CreateAcceptAnyValueCallback()); | 93 PropertyConverter::CreateAcceptAnyValueCallback()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 // Convert a primitive aura property value to a mus transport value. | 96 // Convert a primitive aura property value to a mus transport value. |
| 97 // Note that this implicitly casts arguments to the aura storage type, int64_t. | 97 // Note that this implicitly casts arguments to the aura storage type, int64_t. |
| 98 std::vector<uint8_t> ConvertToPropertyTransportValue(int64_t value) { | 98 std::vector<uint8_t> ConvertToPropertyTransportValue(int64_t value) { |
| 99 return mojo::ConvertTo<std::vector<uint8_t>>(value); | 99 return mojo::ConvertTo<std::vector<uint8_t>>(value); |
| 100 } | 100 } |
| 101 | 101 |
| (...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2404 window_tree()->GetEventResult(event_id)); | 2404 window_tree()->GetEventResult(event_id)); |
| 2405 EXPECT_TRUE(window_delegate1.got_move()); | 2405 EXPECT_TRUE(window_delegate1.got_move()); |
| 2406 EXPECT_FALSE(window_delegate2.got_move()); | 2406 EXPECT_FALSE(window_delegate2.got_move()); |
| 2407 gfx::Point transformed_event_location_in_dip(event_location_in_dip.x() + 20, | 2407 gfx::Point transformed_event_location_in_dip(event_location_in_dip.x() + 20, |
| 2408 event_location_in_dip.y() + 30); | 2408 event_location_in_dip.y() + 30); |
| 2409 EXPECT_EQ(transformed_event_location_in_dip, | 2409 EXPECT_EQ(transformed_event_location_in_dip, |
| 2410 window_delegate1.last_event_location()); | 2410 window_delegate1.last_event_location()); |
| 2411 } | 2411 } |
| 2412 | 2412 |
| 2413 } // namespace aura | 2413 } // namespace aura |
| OLD | NEW |