| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/display/display_manager.h" | 5 #include "ash/display/display_manager.h" |
| 6 #include "ash/root_window_controller.h" | 6 #include "ash/root_window_controller.h" |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "ui/views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
| 30 #include "ui/views/widget/widget_delegate.h" | 30 #include "ui/views/widget/widget_delegate.h" |
| 31 #include "ui/wm/public/activation_client.h" | 31 #include "ui/wm/public/activation_client.h" |
| 32 | 32 |
| 33 namespace ash { | 33 namespace ash { |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 void SetSecondaryDisplayLayout(DisplayPlacement::Position position) { | 36 void SetSecondaryDisplayLayout(DisplayPlacement::Position position) { |
| 37 scoped_ptr<DisplayLayout> layout = | 37 scoped_ptr<DisplayLayout> layout = |
| 38 Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout().Copy(); | 38 Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout().Copy(); |
| 39 layout->placement_list[0]->position = position; | 39 layout->placement_list[0].position = position; |
| 40 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( | 40 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( |
| 41 std::move(layout)); | 41 std::move(layout)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 class ModalWidgetDelegate : public views::WidgetDelegateView { | 44 class ModalWidgetDelegate : public views::WidgetDelegateView { |
| 45 public: | 45 public: |
| 46 ModalWidgetDelegate() {} | 46 ModalWidgetDelegate() {} |
| 47 ~ModalWidgetDelegate() override {} | 47 ~ModalWidgetDelegate() override {} |
| 48 | 48 |
| 49 // Overridden from views::WidgetDelegate: | 49 // Overridden from views::WidgetDelegate: |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 generator.ReleaseLeftButton(); | 928 generator.ReleaseLeftButton(); |
| 929 EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset()); | 929 EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset()); |
| 930 | 930 |
| 931 generator.MoveMouseTo(400, 150); | 931 generator.MoveMouseTo(400, 150); |
| 932 EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset()); | 932 EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset()); |
| 933 | 933 |
| 934 ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler); | 934 ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler); |
| 935 } | 935 } |
| 936 | 936 |
| 937 } // namespace ash | 937 } // namespace ash |
| OLD | NEW |