| 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/aura/wm_window_aura.h" | 5 #include "ash/aura/wm_window_aura.h" |
| 6 #include "ash/common/wm/window_positioner.h" | 6 #include "ash/common/wm/window_positioner.h" |
| 7 #include "ash/common/wm/window_positioning_utils.h" | 7 #include "ash/common/wm/window_positioning_utils.h" |
| 8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 gfx::Point location = surface->window()->GetBoundsInScreen().origin(); | 203 gfx::Point location = surface->window()->GetBoundsInScreen().origin(); |
| 204 | 204 |
| 205 MockTouchDelegate delegate; | 205 MockTouchDelegate delegate; |
| 206 std::unique_ptr<Touch> touch(new Touch(&delegate)); | 206 std::unique_ptr<Touch> touch(new Touch(&delegate)); |
| 207 ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow()); | 207 ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow()); |
| 208 | 208 |
| 209 // Create surface for modal window. | 209 // Create surface for modal window. |
| 210 std::unique_ptr<Surface> surface2(new Surface); | 210 std::unique_ptr<Surface> surface2(new Surface); |
| 211 std::unique_ptr<ShellSurface> shell_surface2( | 211 std::unique_ptr<ShellSurface> shell_surface2( |
| 212 new ShellSurface(surface2.get(), nullptr, gfx::Rect(0, 0, 5, 5), true, | 212 new ShellSurface(surface2.get(), nullptr, gfx::Rect(0, 0, 5, 5), true, |
| 213 ash::kShellWindowId_SystemModalContainer)); | 213 false, ash::kShellWindowId_SystemModalContainer)); |
| 214 std::unique_ptr<Buffer> buffer2( | 214 std::unique_ptr<Buffer> buffer2( |
| 215 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(gfx::Size(5, 5)))); | 215 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(gfx::Size(5, 5)))); |
| 216 surface2->Attach(buffer2.get()); | 216 surface2->Attach(buffer2.get()); |
| 217 surface2->Commit(); | 217 surface2->Commit(); |
| 218 ash::wm::CenterWindow(ash::WmWindowAura::Get(surface2->window())); | 218 ash::wm::CenterWindow(ash::WmWindowAura::Get(surface2->window())); |
| 219 gfx::Point location2 = surface2->window()->GetBoundsInScreen().origin(); | 219 gfx::Point location2 = surface2->window()->GetBoundsInScreen().origin(); |
| 220 | 220 |
| 221 // Make the window modal. | 221 // Make the window modal. |
| 222 shell_surface2->SetSystemModal(true); | 222 shell_surface2->SetSystemModal(true); |
| 223 EXPECT_TRUE(ash::WmShell::Get()->IsSystemModalWindowOpen()); | 223 EXPECT_TRUE(ash::WmShell::Get()->IsSystemModalWindowOpen()); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 } | 268 } |
| 269 generator.set_current_location(location); | 269 generator.set_current_location(location); |
| 270 generator.PressMoveAndReleaseTouchBy(1, 1); | 270 generator.PressMoveAndReleaseTouchBy(1, 1); |
| 271 | 271 |
| 272 EXPECT_CALL(delegate, OnTouchDestroying(touch.get())); | 272 EXPECT_CALL(delegate, OnTouchDestroying(touch.get())); |
| 273 touch.reset(); | 273 touch.reset(); |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace | 276 } // namespace |
| 277 } // namespace exo | 277 } // namespace exo |
| OLD | NEW |