OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/dock/docked_window_resizer.h" | 5 #include "ash/wm/dock/docked_window_resizer.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.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.h" | 10 #include "ash/shelf/shelf.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 kShellWindowId_PanelContainer)->layout_manager()); | 85 kShellWindowId_PanelContainer)->layout_manager()); |
86 manager->Relayout(); | 86 manager->Relayout(); |
87 } | 87 } |
88 return window; | 88 return window; |
89 } | 89 } |
90 | 90 |
91 aura::Window* CreateModalWindow(const gfx::Rect& bounds) { | 91 aura::Window* CreateModalWindow(const gfx::Rect& bounds) { |
92 aura::Window* window = new aura::Window(&delegate_); | 92 aura::Window* window = new aura::Window(&delegate_); |
93 window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM); | 93 window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM); |
94 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 94 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
95 window->Init(aura::WINDOW_LAYER_TEXTURED); | 95 window->Init(ui::LAYER_TEXTURED); |
96 window->Show(); | 96 window->Show(); |
97 | 97 |
98 if (bounds.IsEmpty()) { | 98 if (bounds.IsEmpty()) { |
99 ParentWindowInPrimaryRootWindow(window); | 99 ParentWindowInPrimaryRootWindow(window); |
100 } else { | 100 } else { |
101 gfx::Display display = | 101 gfx::Display display = |
102 Shell::GetScreen()->GetDisplayMatching(bounds); | 102 Shell::GetScreen()->GetDisplayMatching(bounds); |
103 aura::Window* root = ash::Shell::GetInstance()->display_controller()-> | 103 aura::Window* root = ash::Shell::GetInstance()->display_controller()-> |
104 GetRootWindowForDisplayId(display.id()); | 104 GetRootWindowForDisplayId(display.id()); |
105 gfx::Point origin = bounds.origin(); | 105 gfx::Point origin = bounds.origin(); |
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 EXPECT_TRUE(window_state->IsMaximized()); | 1602 EXPECT_TRUE(window_state->IsMaximized()); |
1603 } | 1603 } |
1604 | 1604 |
1605 // Tests run twice - on both panels and normal windows | 1605 // Tests run twice - on both panels and normal windows |
1606 INSTANTIATE_TEST_CASE_P(NormalOrPanel, | 1606 INSTANTIATE_TEST_CASE_P(NormalOrPanel, |
1607 DockedWindowResizerTest, | 1607 DockedWindowResizerTest, |
1608 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, | 1608 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, |
1609 ui::wm::WINDOW_TYPE_PANEL)); | 1609 ui::wm::WINDOW_TYPE_PANEL)); |
1610 | 1610 |
1611 } // namespace ash | 1611 } // namespace ash |
OLD | NEW |