| 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 "ash/common/shell_window_ids.h" | 5 #include "ash/common/shell_window_ids.h" |
| 6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
| 7 #include "components/exo/buffer.h" | 7 #include "components/exo/buffer.h" |
| 8 #include "components/exo/pointer.h" | 8 #include "components/exo/pointer.h" |
| 9 #include "components/exo/pointer_delegate.h" | 9 #include "components/exo/pointer_delegate.h" |
| 10 #include "components/exo/shell_surface.h" | 10 #include "components/exo/shell_surface.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 EXPECT_CALL(delegate, OnPointerEnter(sub_surface.get(), gfx::PointF(), 0)); | 166 EXPECT_CALL(delegate, OnPointerEnter(sub_surface.get(), gfx::PointF(), 0)); |
| 167 generator.MoveMouseTo(sub_surface->GetBoundsInScreen().origin()); | 167 generator.MoveMouseTo(sub_surface->GetBoundsInScreen().origin()); |
| 168 | 168 |
| 169 EXPECT_CALL(delegate, OnPointerMotion(testing::_, gfx::PointF(1, 1))); | 169 EXPECT_CALL(delegate, OnPointerMotion(testing::_, gfx::PointF(1, 1))); |
| 170 generator.MoveMouseTo(sub_surface->GetBoundsInScreen().origin() + | 170 generator.MoveMouseTo(sub_surface->GetBoundsInScreen().origin() + |
| 171 gfx::Vector2d(1, 1)); | 171 gfx::Vector2d(1, 1)); |
| 172 | 172 |
| 173 std::unique_ptr<Surface> child_surface(new Surface); | 173 std::unique_ptr<Surface> child_surface(new Surface); |
| 174 std::unique_ptr<ShellSurface> child_shell_surface(new ShellSurface( | 174 std::unique_ptr<ShellSurface> child_shell_surface(new ShellSurface( |
| 175 child_surface.get(), shell_surface.get(), gfx::Rect(9, 9, 1, 1), true, | 175 child_surface.get(), shell_surface.get(), gfx::Rect(9, 9, 1, 1), true, |
| 176 true, ash::kShellWindowId_DefaultContainer)); | 176 ash::kShellWindowId_DefaultContainer)); |
| 177 gfx::Size child_buffer_size(15, 15); | 177 gfx::Size child_buffer_size(15, 15); |
| 178 std::unique_ptr<Buffer> child_buffer( | 178 std::unique_ptr<Buffer> child_buffer( |
| 179 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(child_buffer_size))); | 179 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(child_buffer_size))); |
| 180 child_surface->Attach(child_buffer.get()); | 180 child_surface->Attach(child_buffer.get()); |
| 181 child_surface->Commit(); | 181 child_surface->Commit(); |
| 182 | 182 |
| 183 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(child_surface.get())) | 183 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(child_surface.get())) |
| 184 .WillRepeatedly(testing::Return(true)); | 184 .WillRepeatedly(testing::Return(true)); |
| 185 | 185 |
| 186 EXPECT_CALL(delegate, OnPointerLeave(sub_surface.get())); | 186 EXPECT_CALL(delegate, OnPointerLeave(sub_surface.get())); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 EXPECT_CALL(delegate, | 284 EXPECT_CALL(delegate, |
| 285 OnPointerScroll(testing::_, gfx::Vector2dF(1, 1), true)); | 285 OnPointerScroll(testing::_, gfx::Vector2dF(1, 1), true)); |
| 286 generator.MoveMouseWheel(1, 1); | 286 generator.MoveMouseWheel(1, 1); |
| 287 | 287 |
| 288 EXPECT_CALL(delegate, OnPointerDestroying(pointer.get())); | 288 EXPECT_CALL(delegate, OnPointerDestroying(pointer.get())); |
| 289 pointer.reset(); | 289 pointer.reset(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace | 292 } // namespace |
| 293 } // namespace exo | 293 } // namespace exo |
| OLD | NEW |