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/ash_constants.h" | 7 #include "ash/ash_constants.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 aura::Window* root = Shell::GetPrimaryRootWindow(); | 112 aura::Window* root = Shell::GetPrimaryRootWindow(); |
113 gfx::Rect root_bounds(root->bounds()); | 113 gfx::Rect root_bounds(root->bounds()); |
114 #if defined(OS_WIN) | 114 #if defined(OS_WIN) |
115 // RootWindow and Display can't resize on Windows Ash. | 115 // RootWindow and Display can't resize on Windows Ash. |
116 // http://crbug.com/165962 | 116 // http://crbug.com/165962 |
117 EXPECT_EQ(kRootHeight, root_bounds.height()); | 117 EXPECT_EQ(kRootHeight, root_bounds.height()); |
118 #endif | 118 #endif |
119 EXPECT_EQ(800, root_bounds.width()); | 119 EXPECT_EQ(800, root_bounds.width()); |
120 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); | 120 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
121 window_.reset(new aura::Window(&delegate_)); | 121 window_.reset(new aura::Window(&delegate_)); |
122 window_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 122 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
123 window_->Init(ui::LAYER_NOT_DRAWN); | 123 window_->Init(ui::LAYER_NOT_DRAWN); |
124 ParentWindowInPrimaryRootWindow(window_.get()); | 124 ParentWindowInPrimaryRootWindow(window_.get()); |
125 window_->set_id(1); | 125 window_->set_id(1); |
126 | 126 |
127 window2_.reset(new aura::Window(&delegate2_)); | 127 window2_.reset(new aura::Window(&delegate2_)); |
128 window2_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 128 window2_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
129 window2_->Init(ui::LAYER_NOT_DRAWN); | 129 window2_->Init(ui::LAYER_NOT_DRAWN); |
130 ParentWindowInPrimaryRootWindow(window2_.get()); | 130 ParentWindowInPrimaryRootWindow(window2_.get()); |
131 window2_->set_id(2); | 131 window2_->set_id(2); |
132 | 132 |
133 window3_.reset(new aura::Window(&delegate3_)); | 133 window3_.reset(new aura::Window(&delegate3_)); |
134 window3_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 134 window3_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
135 window3_->Init(ui::LAYER_NOT_DRAWN); | 135 window3_->Init(ui::LAYER_NOT_DRAWN); |
136 ParentWindowInPrimaryRootWindow(window3_.get()); | 136 ParentWindowInPrimaryRootWindow(window3_.get()); |
137 window3_->set_id(3); | 137 window3_->set_id(3); |
138 | 138 |
139 window4_.reset(new aura::Window(&delegate4_)); | 139 window4_.reset(new aura::Window(&delegate4_)); |
140 window4_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 140 window4_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
141 window4_->Init(ui::LAYER_NOT_DRAWN); | 141 window4_->Init(ui::LAYER_NOT_DRAWN); |
142 ParentWindowInPrimaryRootWindow(window4_.get()); | 142 ParentWindowInPrimaryRootWindow(window4_.get()); |
143 window4_->set_id(4); | 143 window4_->set_id(4); |
144 } | 144 } |
145 | 145 |
146 virtual void TearDown() OVERRIDE { | 146 virtual void TearDown() OVERRIDE { |
147 window_.reset(); | 147 window_.reset(); |
148 window2_.reset(); | 148 window2_.reset(); |
149 window3_.reset(); | 149 window3_.reset(); |
150 window4_.reset(); | 150 window4_.reset(); |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2018 RunAnimationTillComplete(phantom_controller->animation_.get()); | 2018 RunAnimationTillComplete(phantom_controller->animation_.get()); |
2019 | 2019 |
2020 // Hide phantom controller. Both widgets should close. | 2020 // Hide phantom controller. Both widgets should close. |
2021 phantom_controller->Hide(); | 2021 phantom_controller->Hide(); |
2022 EXPECT_FALSE(phantom_controller->phantom_widget_); | 2022 EXPECT_FALSE(phantom_controller->phantom_widget_); |
2023 EXPECT_FALSE(phantom_controller->phantom_widget_start_); | 2023 EXPECT_FALSE(phantom_controller->phantom_widget_start_); |
2024 } | 2024 } |
2025 | 2025 |
2026 } // namespace internal | 2026 } // namespace internal |
2027 } // namespace ash | 2027 } // namespace ash |
OLD | NEW |