OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 // Get rid of X11 macros which conflict with gtest. | 10 // Get rid of X11 macros which conflict with gtest. |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 } | 516 } |
517 DesktopWindowTreeHostX11::g_current_capture = capture_host; | 517 DesktopWindowTreeHostX11::g_current_capture = capture_host; |
518 if (capture_widget) | 518 if (capture_widget) |
519 capture_widget->GetNativeWindow()->SetCapture(); | 519 capture_widget->GetNativeWindow()->SetCapture(); |
520 } | 520 } |
521 | 521 |
522 private: | 522 private: |
523 void SetUp() override { | 523 void SetUp() override { |
524 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 524 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
525 command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, "2"); | 525 command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, "2"); |
526 std::vector<unsigned int> pointer_devices; | 526 std::vector<int> pointer_devices; |
527 pointer_devices.push_back(kPointerDeviceId); | 527 pointer_devices.push_back(kPointerDeviceId); |
528 ui::TouchFactory::GetInstance()->SetPointerDeviceForTest(pointer_devices); | 528 ui::TouchFactory::GetInstance()->SetPointerDeviceForTest(pointer_devices); |
529 | 529 |
530 DesktopWindowTreeHostX11Test::SetUp(); | 530 DesktopWindowTreeHostX11Test::SetUp(); |
531 } | 531 } |
532 | 532 |
533 CustomX11EventSource event_source_; | 533 CustomX11EventSource event_source_; |
534 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11HighDPITest); | 534 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11HighDPITest); |
535 }; | 535 }; |
536 | 536 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 EXPECT_EQ(ui::ET_MOUSEWHEEL, second_recorder.mouse_events()[0].type()); | 583 EXPECT_EQ(ui::ET_MOUSEWHEEL, second_recorder.mouse_events()[0].type()); |
584 EXPECT_EQ(gfx::Point(-25, -25).ToString(), | 584 EXPECT_EQ(gfx::Point(-25, -25).ToString(), |
585 second_recorder.mouse_events()[0].location().ToString()); | 585 second_recorder.mouse_events()[0].location().ToString()); |
586 | 586 |
587 PretendCapture(nullptr); | 587 PretendCapture(nullptr); |
588 first.GetNativeWindow()->RemovePreTargetHandler(&first_recorder); | 588 first.GetNativeWindow()->RemovePreTargetHandler(&first_recorder); |
589 second.GetNativeWindow()->RemovePreTargetHandler(&second_recorder); | 589 second.GetNativeWindow()->RemovePreTargetHandler(&second_recorder); |
590 } | 590 } |
591 | 591 |
592 } // namespace views | 592 } // namespace views |
OLD | NEW |