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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const int kBootSplashScreenHideDurationMs = 500; | 85 const int kBootSplashScreenHideDurationMs = 500; |
86 #endif | 86 #endif |
87 | 87 |
88 // Creates a new window for use as a container. | 88 // Creates a new window for use as a container. |
89 aura::Window* CreateContainer(int window_id, | 89 aura::Window* CreateContainer(int window_id, |
90 const char* name, | 90 const char* name, |
91 aura::Window* parent) { | 91 aura::Window* parent) { |
92 aura::Window* container = new aura::Window(NULL); | 92 aura::Window* container = new aura::Window(NULL); |
93 container->set_id(window_id); | 93 container->set_id(window_id); |
94 container->SetName(name); | 94 container->SetName(name); |
95 container->Init(ui::LAYER_NOT_DRAWN); | 95 container->Init(aura::WINDOW_LAYER_NOT_DRAWN); |
96 parent->AddChild(container); | 96 parent->AddChild(container); |
97 if (window_id != internal::kShellWindowId_UnparentedControlContainer) | 97 if (window_id != internal::kShellWindowId_UnparentedControlContainer) |
98 container->Show(); | 98 container->Show(); |
99 return container; | 99 return container; |
100 } | 100 } |
101 | 101 |
102 float ToRelativeValue(int value, int src, int dst) { | 102 float ToRelativeValue(int value, int src, int dst) { |
103 return static_cast<float>(value) / static_cast<float>(src) * dst; | 103 return static_cast<float>(value) / static_cast<float>(src) * dst; |
104 } | 104 } |
105 | 105 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 aura::Window* status_container = | 714 aura::Window* status_container = |
715 GetContainer(internal::kShellWindowId_StatusContainer); | 715 GetContainer(internal::kShellWindowId_StatusContainer); |
716 shelf_.reset(new ShelfWidget( | 716 shelf_.reset(new ShelfWidget( |
717 shelf_container, status_container, workspace_controller())); | 717 shelf_container, status_container, workspace_controller())); |
718 | 718 |
719 if (!Shell::GetInstance()->session_state_delegate()-> | 719 if (!Shell::GetInstance()->session_state_delegate()-> |
720 IsActiveUserSessionStarted()) { | 720 IsActiveUserSessionStarted()) { |
721 // This window exists only to be a event target on login screen. | 721 // This window exists only to be a event target on login screen. |
722 // It does not have to handle events, nor be visible. | 722 // It does not have to handle events, nor be visible. |
723 mouse_event_target_.reset(new aura::Window(new EmptyWindowDelegate)); | 723 mouse_event_target_.reset(new aura::Window(new EmptyWindowDelegate)); |
724 mouse_event_target_->Init(ui::LAYER_NOT_DRAWN); | 724 mouse_event_target_->Init(aura::WINDOW_LAYER_NOT_DRAWN); |
725 | 725 |
726 aura::Window* lock_background_container = | 726 aura::Window* lock_background_container = |
727 GetContainer(internal::kShellWindowId_LockScreenBackgroundContainer); | 727 GetContainer(internal::kShellWindowId_LockScreenBackgroundContainer); |
728 lock_background_container->AddChild(mouse_event_target_.get()); | 728 lock_background_container->AddChild(mouse_event_target_.get()); |
729 mouse_event_target_->Show(); | 729 mouse_event_target_->Show(); |
730 } | 730 } |
731 | 731 |
732 // Create Docked windows layout manager | 732 // Create Docked windows layout manager |
733 aura::Window* docked_container = GetContainer( | 733 aura::Window* docked_container = GetContainer( |
734 internal::kShellWindowId_DockedContainer); | 734 internal::kShellWindowId_DockedContainer); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 DisableTouchHudProjection(); | 981 DisableTouchHudProjection(); |
982 } | 982 } |
983 | 983 |
984 RootWindowController* GetRootWindowController( | 984 RootWindowController* GetRootWindowController( |
985 const aura::Window* root_window) { | 985 const aura::Window* root_window) { |
986 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 986 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
987 } | 987 } |
988 | 988 |
989 } // namespace internal | 989 } // namespace internal |
990 } // namespace ash | 990 } // namespace ash |
OLD | NEW |