| 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 12 matching lines...) Expand all Loading... |
| 23 #include "ui/aura/mus/property_converter.h" | 23 #include "ui/aura/mus/property_converter.h" |
| 24 #include "ui/aura/mus/window_mus.h" | 24 #include "ui/aura/mus/window_mus.h" |
| 25 #include "ui/aura/mus/window_tree_client_delegate.h" | 25 #include "ui/aura/mus/window_tree_client_delegate.h" |
| 26 #include "ui/aura/mus/window_tree_client_observer.h" | 26 #include "ui/aura/mus/window_tree_client_observer.h" |
| 27 #include "ui/aura/mus/window_tree_host_mus.h" | 27 #include "ui/aura/mus/window_tree_host_mus.h" |
| 28 #include "ui/aura/test/aura_mus_test_base.h" | 28 #include "ui/aura/test/aura_mus_test_base.h" |
| 29 #include "ui/aura/test/mus/test_window_tree.h" | 29 #include "ui/aura/test/mus/test_window_tree.h" |
| 30 #include "ui/aura/test/mus/window_tree_client_private.h" | 30 #include "ui/aura/test/mus/window_tree_client_private.h" |
| 31 #include "ui/aura/test/test_window_delegate.h" | 31 #include "ui/aura/test/test_window_delegate.h" |
| 32 #include "ui/aura/window.h" | 32 #include "ui/aura/window.h" |
| 33 #include "ui/aura/window_property.h" | |
| 34 #include "ui/aura/window_tracker.h" | 33 #include "ui/aura/window_tracker.h" |
| 35 #include "ui/aura/window_tree_host_observer.h" | 34 #include "ui/aura/window_tree_host_observer.h" |
| 35 #include "ui/base/class_property.h" |
| 36 #include "ui/compositor/compositor.h" | 36 #include "ui/compositor/compositor.h" |
| 37 #include "ui/display/display_switches.h" | 37 #include "ui/display/display_switches.h" |
| 38 #include "ui/events/event.h" | 38 #include "ui/events/event.h" |
| 39 #include "ui/events/event_utils.h" | 39 #include "ui/events/event_utils.h" |
| 40 #include "ui/gfx/geometry/rect.h" | 40 #include "ui/gfx/geometry/rect.h" |
| 41 | 41 |
| 42 namespace aura { | 42 namespace aura { |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 DEFINE_WINDOW_PROPERTY_KEY(uint8_t, kTestPropertyKey1, 0); | 46 DEFINE_UI_CLASS_PROPERTY_KEY(uint8_t, kTestPropertyKey1, 0); |
| 47 DEFINE_WINDOW_PROPERTY_KEY(uint16_t, kTestPropertyKey2, 0); | 47 DEFINE_UI_CLASS_PROPERTY_KEY(uint16_t, kTestPropertyKey2, 0); |
| 48 DEFINE_WINDOW_PROPERTY_KEY(bool, kTestPropertyKey3, false); | 48 DEFINE_UI_CLASS_PROPERTY_KEY(bool, kTestPropertyKey3, false); |
| 49 | 49 |
| 50 const char kTestPropertyServerKey1[] = "test-property-server1"; | 50 const char kTestPropertyServerKey1[] = "test-property-server1"; |
| 51 const char kTestPropertyServerKey2[] = "test-property-server2"; | 51 const char kTestPropertyServerKey2[] = "test-property-server2"; |
| 52 const char kTestPropertyServerKey3[] = "test-property-server3"; | 52 const char kTestPropertyServerKey3[] = "test-property-server3"; |
| 53 | 53 |
| 54 Id server_id(Window* window) { | 54 Id server_id(Window* window) { |
| 55 return WindowMus::Get(window)->server_id(); | 55 return WindowMus::Get(window)->server_id(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void SetWindowVisibility(Window* window, bool visible) { | 58 void SetWindowVisibility(Window* window, bool visible) { |
| (...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 window_tree_client()->OnTopLevelCreated(change_id, std::move(data), | 1495 window_tree_client()->OnTopLevelCreated(change_id, std::move(data), |
| 1496 display_id, true); | 1496 display_id, true); |
| 1497 | 1497 |
| 1498 // aura::Window should operate in DIP and aura::WindowTreeHost should operate | 1498 // aura::Window should operate in DIP and aura::WindowTreeHost should operate |
| 1499 // in pixels. | 1499 // in pixels. |
| 1500 EXPECT_EQ(gfx::Rect(0, 0, 3, 4), top_level->bounds()); | 1500 EXPECT_EQ(gfx::Rect(0, 0, 3, 4), top_level->bounds()); |
| 1501 EXPECT_EQ(gfx::Rect(2, 4, 6, 8), top_level->GetHost()->GetBoundsInPixels()); | 1501 EXPECT_EQ(gfx::Rect(2, 4, 6, 8), top_level->GetHost()->GetBoundsInPixels()); |
| 1502 } | 1502 } |
| 1503 | 1503 |
| 1504 } // namespace aura | 1504 } // namespace aura |
| OLD | NEW |