| 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/window_tree_host_manager.h" | 5 #include "ash/display/window_tree_host_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/display/display_util.h" | 9 #include "ash/display/display_util.h" |
| 10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
| 11 #include "ash/shelf/shelf_widget.h" | 11 #include "ash/shelf/shelf_widget.h" |
| 12 #include "ash/shelf/wm_shelf.h" | 12 #include "ash/shelf/wm_shelf.h" |
| 13 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 14 #include "ash/test/ash_test_base.h" | 14 #include "ash/test/ash_test_base.h" |
| 15 #include "ash/test/ash_test_helper.h" | 15 #include "ash/test/ash_test_helper.h" |
| 16 #include "ash/test/cursor_manager_test_api.h" | 16 #include "ash/test/cursor_manager_test_api.h" |
| 17 #include "ash/test/test_shell_delegate.h" | 17 #include "ash/test/test_shell_delegate.h" |
| 18 #include "ash/wm/window_state.h" | 18 #include "ash/wm/window_state.h" |
| 19 #include "ash/wm/window_state_aura.h" | 19 #include "ash/wm/window_state_aura.h" |
| 20 #include "ash/wm/wm_event.h" | 20 #include "ash/wm/wm_event.h" |
| 21 #include "ash/wm/wm_screen_util.h" | |
| 22 #include "ash/wm_window.h" | |
| 23 #include "base/command_line.h" | 21 #include "base/command_line.h" |
| 24 #include "ui/aura/client/focus_change_observer.h" | 22 #include "ui/aura/client/focus_change_observer.h" |
| 25 #include "ui/aura/client/focus_client.h" | 23 #include "ui/aura/client/focus_client.h" |
| 26 #include "ui/aura/env.h" | 24 #include "ui/aura/env.h" |
| 27 #include "ui/aura/window_observer.h" | 25 #include "ui/aura/window_observer.h" |
| 28 #include "ui/aura/window_tracker.h" | 26 #include "ui/aura/window_tracker.h" |
| 29 #include "ui/aura/window_tree_host.h" | 27 #include "ui/aura/window_tree_host.h" |
| 30 #include "ui/display/display.h" | 28 #include "ui/display/display.h" |
| 31 #include "ui/display/display_layout.h" | 29 #include "ui/display/display_layout.h" |
| 32 #include "ui/display/display_layout_builder.h" | 30 #include "ui/display/display_layout_builder.h" |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1487 namespace { | 1485 namespace { |
| 1488 | 1486 |
| 1489 class RootWindowTestObserver : public aura::WindowObserver { | 1487 class RootWindowTestObserver : public aura::WindowObserver { |
| 1490 public: | 1488 public: |
| 1491 RootWindowTestObserver() {} | 1489 RootWindowTestObserver() {} |
| 1492 ~RootWindowTestObserver() override {} | 1490 ~RootWindowTestObserver() override {} |
| 1493 | 1491 |
| 1494 void OnWindowBoundsChanged(aura::Window* window, | 1492 void OnWindowBoundsChanged(aura::Window* window, |
| 1495 const gfx::Rect& old_bounds, | 1493 const gfx::Rect& old_bounds, |
| 1496 const gfx::Rect& new_bounds) override { | 1494 const gfx::Rect& new_bounds) override { |
| 1497 shelf_display_bounds_ = | 1495 shelf_display_bounds_ = ScreenUtil::GetDisplayBoundsWithShelf(window); |
| 1498 wm::GetDisplayBoundsWithShelf(WmWindow::Get(window)); | |
| 1499 } | 1496 } |
| 1500 | 1497 |
| 1501 const gfx::Rect& shelf_display_bounds() const { | 1498 const gfx::Rect& shelf_display_bounds() const { |
| 1502 return shelf_display_bounds_; | 1499 return shelf_display_bounds_; |
| 1503 } | 1500 } |
| 1504 | 1501 |
| 1505 private: | 1502 private: |
| 1506 gfx::Rect shelf_display_bounds_; | 1503 gfx::Rect shelf_display_bounds_; |
| 1507 | 1504 |
| 1508 DISALLOW_COPY_AND_ASSIGN(RootWindowTestObserver); | 1505 DISALLOW_COPY_AND_ASSIGN(RootWindowTestObserver); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1701 widget->GetNativeWindow()->GetRootWindow()); | 1698 widget->GetNativeWindow()->GetRootWindow()); |
| 1702 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); | 1699 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); |
| 1703 | 1700 |
| 1704 UpdateDisplay("300x300"); | 1701 UpdateDisplay("300x300"); |
| 1705 watcher.Stop(); | 1702 watcher.Stop(); |
| 1706 | 1703 |
| 1707 widget->CloseNow(); | 1704 widget->CloseNow(); |
| 1708 } | 1705 } |
| 1709 | 1706 |
| 1710 } // namespace ash | 1707 } // namespace ash |
| OLD | NEW |