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

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

Issue 121773003: Makes Window::Init take a WindowLayerType instead of LayerType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to master Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/wm/drag_window_resizer_unittest.cc » ('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/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shelf/shelf.h" 10 #include "ash/shelf/shelf.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 layout_manager()); 89 layout_manager());
90 manager->Relayout(); 90 manager->Relayout();
91 } 91 }
92 return window; 92 return window;
93 } 93 }
94 94
95 aura::Window* CreateModalWindow(const gfx::Rect& bounds) { 95 aura::Window* CreateModalWindow(const gfx::Rect& bounds) {
96 aura::Window* window = new aura::Window(&delegate_); 96 aura::Window* window = new aura::Window(&delegate_);
97 window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM); 97 window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM);
98 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); 98 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
99 window->Init(ui::LAYER_TEXTURED); 99 window->Init(aura::WINDOW_LAYER_TEXTURED);
100 window->Show(); 100 window->Show();
101 101
102 if (bounds.IsEmpty()) { 102 if (bounds.IsEmpty()) {
103 ParentWindowInPrimaryRootWindow(window); 103 ParentWindowInPrimaryRootWindow(window);
104 } else { 104 } else {
105 gfx::Display display = 105 gfx::Display display =
106 Shell::GetScreen()->GetDisplayMatching(bounds); 106 Shell::GetScreen()->GetDisplayMatching(bounds);
107 aura::Window* root = ash::Shell::GetInstance()->display_controller()-> 107 aura::Window* root = ash::Shell::GetInstance()->display_controller()->
108 GetRootWindowForDisplayId(display.id()); 108 GetRootWindowForDisplayId(display.id());
109 gfx::Point origin = bounds.origin(); 109 gfx::Point origin = bounds.origin();
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 EXPECT_TRUE(window_state->IsSnapped()); 1426 EXPECT_TRUE(window_state->IsSnapped());
1427 } 1427 }
1428 1428
1429 // Tests run twice - on both panels and normal windows 1429 // Tests run twice - on both panels and normal windows
1430 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 1430 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
1431 DockedWindowResizerTest, 1431 DockedWindowResizerTest,
1432 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 1432 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
1433 ui::wm::WINDOW_TYPE_PANEL)); 1433 ui::wm::WINDOW_TYPE_PANEL));
1434 } // namespace internal 1434 } // namespace internal
1435 } // namespace ash 1435 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698