Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: ash/wm/dock/docked_window_resizer_unittest.cc

Issue 1918883002: Makes Panel related classes use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@phantom_window_controller
Patch Set: feedback Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager_unittest.cc ('k') | ash/wm/drag_window_resizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/display/window_tree_host_manager.h" 8 #include "ash/display/window_tree_host_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { 76 aura::Window* CreateTestWindow(const gfx::Rect& bounds) {
77 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 77 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
78 &delegate_, 78 &delegate_,
79 window_type_, 79 window_type_,
80 0, 80 0,
81 bounds); 81 bounds);
82 if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) { 82 if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) {
83 test::TestShelfDelegate* shelf_delegate = 83 test::TestShelfDelegate* shelf_delegate =
84 test::TestShelfDelegate::instance(); 84 test::TestShelfDelegate::instance();
85 shelf_delegate->AddShelfItem(window); 85 shelf_delegate->AddShelfItem(window);
86 PanelLayoutManager* manager = static_cast<PanelLayoutManager*>( 86 PanelLayoutManager* manager =
87 Shell::GetContainer(window->GetRootWindow(), 87 PanelLayoutManager::Get(wm::WmWindowAura::Get(window));
88 kShellWindowId_PanelContainer)->layout_manager());
89 manager->Relayout(); 88 manager->Relayout();
90 } 89 }
91 return window; 90 return window;
92 } 91 }
93 92
94 aura::Window* CreateModalWindow(const gfx::Rect& bounds) { 93 aura::Window* CreateModalWindow(const gfx::Rect& bounds) {
95 aura::Window* window = new aura::Window(&delegate_); 94 aura::Window* window = new aura::Window(&delegate_);
96 window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM); 95 window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM);
97 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); 96 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
98 window->Init(ui::LAYER_TEXTURED); 97 window->Init(ui::LAYER_TEXTURED);
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 EXPECT_TRUE(window_state->IsMaximized()); 1615 EXPECT_TRUE(window_state->IsMaximized());
1617 } 1616 }
1618 1617
1619 // Tests run twice - on both panels and normal windows 1618 // Tests run twice - on both panels and normal windows
1620 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 1619 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
1621 DockedWindowResizerTest, 1620 DockedWindowResizerTest,
1622 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 1621 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
1623 ui::wm::WINDOW_TYPE_PANEL)); 1622 ui::wm::WINDOW_TYPE_PANEL));
1624 1623
1625 } // namespace ash 1624 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager_unittest.cc ('k') | ash/wm/drag_window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698