OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/wm/core/capture_controller.h" | 5 #include "ui/wm/core/capture_controller.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 delegate->window()->SetCapture(); | 267 delegate->window()->SetCapture(); |
268 | 268 |
269 // capture should not be set upon exit from SetCapture() above. | 269 // capture should not be set upon exit from SetCapture() above. |
270 aura::client::CaptureClient* capture_client = | 270 aura::client::CaptureClient* capture_client = |
271 aura::client::GetCaptureClient(root_window()); | 271 aura::client::GetCaptureClient(root_window()); |
272 ASSERT_NE(nullptr, capture_client); | 272 ASSERT_NE(nullptr, capture_client); |
273 EXPECT_EQ(nullptr, capture_client->GetCaptureWindow()); | 273 EXPECT_EQ(nullptr, capture_client->GetCaptureWindow()); |
274 | 274 |
275 // Send a mouse click. We no longer hold capture so this should not crash. | 275 // Send a mouse click. We no longer hold capture so this should not crash. |
276 ui::MouseEvent mouse_press(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), | 276 ui::MouseEvent mouse_press(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), |
277 base::TimeDelta(), 0, 0); | 277 base::TimeTicks(), 0, 0); |
278 DispatchEventUsingWindowDispatcher(&mouse_press); | 278 DispatchEventUsingWindowDispatcher(&mouse_press); |
279 } | 279 } |
280 | 280 |
281 } // namespace wm | 281 } // namespace wm |
OLD | NEW |