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