Skip to content

Commit

Permalink
Makes Window::Init take a WindowLayerType instead of LayerType.
Browse files Browse the repository at this point in the history
BUG=none
TEST=none
R=ben@chromium.org

Review URL: https://codereview.chromium.org/121773003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243656 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
sky@chromium.org committed Jan 8, 2014
1 parent 43c1f53 commit 52b02a7
Show file tree
Hide file tree
Showing 43 changed files with 567 additions and 159 deletions.
4 changes: 2 additions & 2 deletions ash/display/mirror_window_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void MirrorWindowController::UpdateWindow(const DisplayInfo& display_info) {

// TODO(oshima): Start mirroring.
aura::Window* mirror_window = new aura::Window(NULL);
mirror_window->Init(ui::LAYER_TEXTURED);
mirror_window->Init(aura::WINDOW_LAYER_TEXTURED);
root_window_->window()->AddChild(mirror_window);
mirror_window->SetBounds(root_window_->window()->bounds());
mirror_window->Show();
Expand All @@ -198,7 +198,7 @@ void MirrorWindowController::UpdateWindow(const DisplayInfo& display_info) {

cursor_window_ = new aura::Window(cursor_window_delegate_.get());
cursor_window_->SetTransparent(true);
cursor_window_->Init(ui::LAYER_TEXTURED);
cursor_window_->Init(aura::WINDOW_LAYER_TEXTURED);
root_window_->window()->AddChild(cursor_window_);
cursor_window_->Show();
} else {
Expand Down
2 changes: 1 addition & 1 deletion ash/display/screen_position_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ScreenPositionControllerTest : public test::AshTestBase {
AshTestBase::SetUp();
window_.reset(new aura::Window(&window_delegate_));
window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window_->Init(ui::LAYER_NOT_DRAWN);
window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(window_.get());
window_->set_id(1);
}
Expand Down
2 changes: 1 addition & 1 deletion ash/drag_drop/drag_drop_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ aura::Window* CreateCaptureWindow(aura::Window* context_root,
aura::WindowDelegate* delegate) {
aura::Window* window = new aura::Window(delegate);
window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_NOT_DRAWN);
window->Init(aura::WINDOW_LAYER_NOT_DRAWN);
aura::client::ParentWindowWithContext(window, context_root, gfx::Rect());
window->Show();
DCHECK(window->bounds().size().IsEmpty());
Expand Down
4 changes: 2 additions & 2 deletions ash/root_window_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ aura::Window* CreateContainer(int window_id,
aura::Window* container = new aura::Window(NULL);
container->set_id(window_id);
container->SetName(name);
container->Init(ui::LAYER_NOT_DRAWN);
container->Init(aura::WINDOW_LAYER_NOT_DRAWN);
parent->AddChild(container);
if (window_id != internal::kShellWindowId_UnparentedControlContainer)
container->Show();
Expand Down Expand Up @@ -721,7 +721,7 @@ void RootWindowController::InitLayoutManagers() {
// This window exists only to be a event target on login screen.
// It does not have to handle events, nor be visible.
mouse_event_target_.reset(new aura::Window(new EmptyWindowDelegate));
mouse_event_target_->Init(ui::LAYER_NOT_DRAWN);
mouse_event_target_->Init(aura::WINDOW_LAYER_NOT_DRAWN);

aura::Window* lock_background_container =
GetContainer(internal::kShellWindowId_LockScreenBackgroundContainer);
Expand Down
4 changes: 2 additions & 2 deletions ash/root_window_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -529,15 +529,15 @@ TEST_F(RootWindowControllerTest, DontDeleteWindowsNotOwnedByParent) {
window1->SetType(ui::wm::WINDOW_TYPE_CONTROL);
window1->set_owned_by_parent(false);
observer1.SetWindow(window1);
window1->Init(ui::LAYER_NOT_DRAWN);
window1->Init(aura::WINDOW_LAYER_NOT_DRAWN);
aura::client::ParentWindowWithContext(
window1, Shell::GetInstance()->GetPrimaryRootWindow(), gfx::Rect());

DestroyedWindowObserver observer2;
aura::Window* window2 = new aura::Window(NULL);
window2->set_owned_by_parent(false);
observer2.SetWindow(window2);
window2->Init(ui::LAYER_NOT_DRAWN);
window2->Init(aura::WINDOW_LAYER_NOT_DRAWN);
Shell::GetInstance()->GetPrimaryRootWindow()->AddChild(window2);

Shell::GetInstance()->GetPrimaryRootWindowController()->CloseChildWindows();
Expand Down
2 changes: 1 addition & 1 deletion ash/shelf/shelf_layout_manager_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class ShelfLayoutManagerTest : public ash::test::AshTestBase {
aura::Window* window = new aura::Window(NULL);
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_TEXTURED);
window->Init(aura::WINDOW_LAYER_TEXTURED);
ParentWindowInPrimaryRootWindow(window);
return window;
}
Expand Down
2 changes: 1 addition & 1 deletion ash/shell/keyboard_controller_proxy_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ KeyboardControllerProxyStub::~KeyboardControllerProxyStub() {
aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() {
if (!keyboard_) {
keyboard_.reset(new aura::Window(&delegate_));
keyboard_->Init(ui::LAYER_NOT_DRAWN);
keyboard_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
}
return keyboard_.get();
}
Expand Down
4 changes: 2 additions & 2 deletions ash/shell_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ TEST_F(ShellTest, ToggleAutoHide) {
scoped_ptr<aura::Window> window(new aura::Window(NULL));
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_TEXTURED);
window->Init(aura::WINDOW_LAYER_TEXTURED);
ParentWindowInPrimaryRootWindow(window.get());
window->Show();
wm::ActivateWindow(window.get());
Expand Down Expand Up @@ -532,7 +532,7 @@ class ShellTest2 : public test::AshTestBase {

TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
window_.reset(new aura::Window(NULL));
window_->Init(ui::LAYER_NOT_DRAWN);
window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
}

} // namespace ash
2 changes: 1 addition & 1 deletion ash/test/ash_test_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ aura::Window* AshTestBase::CreateTestWindowInShellWithDelegateAndType(
aura::Window* window = new aura::Window(delegate);
window->set_id(id);
window->SetType(type);
window->Init(ui::LAYER_TEXTURED);
window->Init(aura::WINDOW_LAYER_TEXTURED);
window->Show();

if (bounds.IsEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion ash/wm/dock/docked_window_resizer_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class DockedWindowResizerTest
aura::Window* window = new aura::Window(&delegate_);
window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM);
window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_TEXTURED);
window->Init(aura::WINDOW_LAYER_TEXTURED);
window->Show();

if (bounds.IsEmpty()) {
Expand Down
14 changes: 7 additions & 7 deletions ash/wm/drag_window_resizer_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,41 +56,41 @@ class DragWindowResizerTest : public test::AshTestBase {
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
window_.reset(new aura::Window(&delegate_));
window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window_->Init(ui::LAYER_NOT_DRAWN);
window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(window_.get());
window_->set_id(1);

always_on_top_window_.reset(new aura::Window(&delegate2_));
always_on_top_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
always_on_top_window_->SetProperty(aura::client::kAlwaysOnTopKey, true);
always_on_top_window_->Init(ui::LAYER_NOT_DRAWN);
always_on_top_window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(always_on_top_window_.get());
always_on_top_window_->set_id(2);

system_modal_window_.reset(new aura::Window(&delegate3_));
system_modal_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
system_modal_window_->SetProperty(aura::client::kModalKey,
ui::MODAL_TYPE_SYSTEM);
system_modal_window_->Init(ui::LAYER_NOT_DRAWN);
system_modal_window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(system_modal_window_.get());
system_modal_window_->set_id(3);

transient_child_ = new aura::Window(&delegate4_);
transient_child_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
transient_child_->Init(ui::LAYER_NOT_DRAWN);
transient_child_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(transient_child_);
transient_child_->set_id(4);

transient_parent_.reset(new aura::Window(&delegate5_));
transient_parent_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
transient_parent_->Init(ui::LAYER_NOT_DRAWN);
transient_parent_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(transient_parent_.get());
views::corewm::AddTransientChild(transient_parent_.get(), transient_child_);
transient_parent_->set_id(5);

panel_window_.reset(new aura::Window(&delegate6_));
panel_window_->SetType(ui::wm::WINDOW_TYPE_PANEL);
panel_window_->Init(ui::LAYER_NOT_DRAWN);
panel_window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(panel_window_.get());
}

Expand Down Expand Up @@ -294,7 +294,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysActiveRoot) {
aura::test::TestWindowDelegate delegate;
scoped_ptr<aura::Window> window(new aura::Window(&delegate));
window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_TEXTURED);
window->Init(aura::WINDOW_LAYER_TEXTURED);
ParentWindowInPrimaryRootWindow(window.get());
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
Expand Down
Loading

0 comments on commit 52b02a7

Please sign in to comment.