| 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_controller.h" | 5 #include "ash/display/display_controller.h" |
| 6 #include "ash/display/display_manager.h" | 6 #include "ash/display/display_manager.h" |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/screen_ash.h" | 8 #include "ash/screen_ash.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 void SetSecondaryDisplayLayout(DisplayLayout::Position position) { | 37 void SetSecondaryDisplayLayout(DisplayLayout::Position position) { |
| 38 DisplayLayout layout = | 38 DisplayLayout layout = |
| 39 Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout(); | 39 Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout(); |
| 40 layout.position = position; | 40 layout.position = position; |
| 41 Shell::GetInstance()->display_manager()-> | 41 Shell::GetInstance()->display_manager()-> |
| 42 SetLayoutForCurrentDisplays(layout); | 42 SetLayoutForCurrentDisplays(layout); |
| 43 } | 43 } |
| 44 | 44 |
| 45 internal::DisplayManager* GetDisplayManager() { | |
| 46 return Shell::GetInstance()->display_manager(); | |
| 47 } | |
| 48 | |
| 49 class ModalWidgetDelegate : public views::WidgetDelegateView { | 45 class ModalWidgetDelegate : public views::WidgetDelegateView { |
| 50 public: | 46 public: |
| 51 ModalWidgetDelegate() {} | 47 ModalWidgetDelegate() {} |
| 52 virtual ~ModalWidgetDelegate() {} | 48 virtual ~ModalWidgetDelegate() {} |
| 53 | 49 |
| 54 // Overridden from views::WidgetDelegate: | 50 // Overridden from views::WidgetDelegate: |
| 55 virtual views::View* GetContentsView() OVERRIDE { | 51 virtual views::View* GetContentsView() OVERRIDE { |
| 56 return this; | 52 return this; |
| 57 } | 53 } |
| 58 virtual ui::ModalType GetModalType() const OVERRIDE { | 54 virtual ui::ModalType GetModalType() const OVERRIDE { |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 generator.ReleaseLeftButton(); | 838 generator.ReleaseLeftButton(); |
| 843 EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset()); | 839 EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset()); |
| 844 | 840 |
| 845 generator.MoveMouseTo(400, 150); | 841 generator.MoveMouseTo(400, 150); |
| 846 EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset()); | 842 EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset()); |
| 847 | 843 |
| 848 ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler); | 844 ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler); |
| 849 } | 845 } |
| 850 | 846 |
| 851 } // namespace ash | 847 } // namespace ash |
| OLD | NEW |