| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 Display* display = *display_manager->displays().begin(); | 70 Display* display = *display_manager->displays().begin(); |
| 71 WindowManagerDisplayRoot* active_display_root = | 71 WindowManagerDisplayRoot* active_display_root = |
| 72 display->GetActiveWindowManagerDisplayRoot(); | 72 display->GetActiveWindowManagerDisplayRoot(); |
| 73 WindowTree* tree = | 73 WindowTree* tree = |
| 74 active_display_root->window_manager_state()->window_tree(); | 74 active_display_root->window_manager_state()->window_tree(); |
| 75 ClientWindowId child_window_id; | 75 ClientWindowId child_window_id; |
| 76 if (!NewWindowInTree(tree, &child_window_id)) | 76 if (!NewWindowInTree(tree, &child_window_id)) |
| 77 return nullptr; | 77 return nullptr; |
| 78 | 78 |
| 79 ServerWindow* w = tree->GetWindowByClientId(child_window_id); | 79 ServerWindow* w = tree->GetWindowByClientId(child_window_id); |
| 80 w->SetBounds(gfx::Rect(10, 10, 30, 30)); | 80 w->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId()); |
| 81 w->SetClientArea(gfx::Insets(10, 10), std::vector<gfx::Rect>()); | 81 w->SetClientArea(gfx::Insets(10, 10), std::vector<gfx::Rect>()); |
| 82 w->SetVisible(true); | 82 w->SetVisible(true); |
| 83 | 83 |
| 84 ServerWindowCompositorFrameSinkManagerTestApi test_api( | 84 ServerWindowCompositorFrameSinkManagerTestApi test_api( |
| 85 w->GetOrCreateCompositorFrameSinkManager()); | 85 w->GetOrCreateCompositorFrameSinkManager()); |
| 86 test_api.CreateEmptyDefaultCompositorFrameSink(); | 86 test_api.CreateEmptyDefaultCompositorFrameSink(); |
| 87 | 87 |
| 88 return w; | 88 return w; |
| 89 } | 89 } |
| 90 | 90 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 ServerWindow* win = BuildServerWindow(); | 171 ServerWindow* win = BuildServerWindow(); |
| 172 win->SetPredefinedCursor(mojom::Cursor::IBEAM); | 172 win->SetPredefinedCursor(mojom::Cursor::IBEAM); |
| 173 EXPECT_EQ(mojom::Cursor::IBEAM, win->cursor()); | 173 EXPECT_EQ(mojom::Cursor::IBEAM, win->cursor()); |
| 174 win->SetNonClientCursor(mojom::Cursor::EAST_RESIZE); | 174 win->SetNonClientCursor(mojom::Cursor::EAST_RESIZE); |
| 175 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, win->non_client_cursor()); | 175 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, win->non_client_cursor()); |
| 176 | 176 |
| 177 // Non client area before we move. | 177 // Non client area before we move. |
| 178 MoveCursorTo(gfx::Point(15, 15)); | 178 MoveCursorTo(gfx::Point(15, 15)); |
| 179 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, cursor()); | 179 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, cursor()); |
| 180 | 180 |
| 181 win->SetBounds(gfx::Rect(0, 0, 30, 30)); | 181 win->SetBounds(gfx::Rect(0, 0, 30, 30), cc::LocalFrameId()); |
| 182 EXPECT_EQ(mojom::Cursor::IBEAM, cursor()); | 182 EXPECT_EQ(mojom::Cursor::IBEAM, cursor()); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace test | 185 } // namespace test |
| 186 } // namespace ws | 186 } // namespace ws |
| 187 } // namespace ui | 187 } // namespace ui |
| OLD | NEW |