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/wm/workspace/workspace_window_resizer.h" | 5 #include "ash/wm/workspace/workspace_window_resizer.h" |
6 | 6 |
7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/screen_util.h" | 9 #include "ash/screen_util.h" |
10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 gfx::Rect root_bounds(root->bounds()); | 79 gfx::Rect root_bounds(root->bounds()); |
80 #if defined(OS_WIN) | 80 #if defined(OS_WIN) |
81 // RootWindow and Display can't resize on Windows Ash. | 81 // RootWindow and Display can't resize on Windows Ash. |
82 // http://crbug.com/165962 | 82 // http://crbug.com/165962 |
83 EXPECT_EQ(kRootHeight, root_bounds.height()); | 83 EXPECT_EQ(kRootHeight, root_bounds.height()); |
84 #endif | 84 #endif |
85 EXPECT_EQ(800, root_bounds.width()); | 85 EXPECT_EQ(800, root_bounds.width()); |
86 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); | 86 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
87 window_.reset(new aura::Window(&delegate_)); | 87 window_.reset(new aura::Window(&delegate_)); |
88 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 88 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
89 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 89 window_->Init(ui::LAYER_NOT_DRAWN); |
90 ParentWindowInPrimaryRootWindow(window_.get()); | 90 ParentWindowInPrimaryRootWindow(window_.get()); |
91 window_->set_id(1); | 91 window_->set_id(1); |
92 | 92 |
93 window2_.reset(new aura::Window(&delegate2_)); | 93 window2_.reset(new aura::Window(&delegate2_)); |
94 window2_->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 94 window2_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
95 window2_->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 95 window2_->Init(ui::LAYER_NOT_DRAWN); |
96 ParentWindowInPrimaryRootWindow(window2_.get()); | 96 ParentWindowInPrimaryRootWindow(window2_.get()); |
97 window2_->set_id(2); | 97 window2_->set_id(2); |
98 | 98 |
99 window3_.reset(new aura::Window(&delegate3_)); | 99 window3_.reset(new aura::Window(&delegate3_)); |
100 window3_->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 100 window3_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
101 window3_->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 101 window3_->Init(ui::LAYER_NOT_DRAWN); |
102 ParentWindowInPrimaryRootWindow(window3_.get()); | 102 ParentWindowInPrimaryRootWindow(window3_.get()); |
103 window3_->set_id(3); | 103 window3_->set_id(3); |
104 | 104 |
105 window4_.reset(new aura::Window(&delegate4_)); | 105 window4_.reset(new aura::Window(&delegate4_)); |
106 window4_->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 106 window4_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
107 window4_->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 107 window4_->Init(ui::LAYER_NOT_DRAWN); |
108 ParentWindowInPrimaryRootWindow(window4_.get()); | 108 ParentWindowInPrimaryRootWindow(window4_.get()); |
109 window4_->set_id(4); | 109 window4_->set_id(4); |
110 } | 110 } |
111 | 111 |
112 void TearDown() override { | 112 void TearDown() override { |
113 window_.reset(); | 113 window_.reset(); |
114 window2_.reset(); | 114 window2_.reset(); |
115 window3_.reset(); | 115 window3_.reset(); |
116 window4_.reset(); | 116 window4_.reset(); |
117 touch_resize_window_.reset(); | 117 touch_resize_window_.reset(); |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1877 // Drag even more to snap to the edge. | 1877 // Drag even more to snap to the edge. |
1878 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), | 1878 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), |
1879 gfx::Point(400, kRootHeight - 25), | 1879 gfx::Point(400, kRootHeight - 25), |
1880 base::TimeDelta::FromMilliseconds(10), | 1880 base::TimeDelta::FromMilliseconds(10), |
1881 5); | 1881 5); |
1882 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), | 1882 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), |
1883 touch_resize_window_->bounds().ToString()); | 1883 touch_resize_window_->bounds().ToString()); |
1884 } | 1884 } |
1885 | 1885 |
1886 } // namespace ash | 1886 } // namespace ash |
OLD | NEW |