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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 const int kBootSplashScreenHideDurationMs = 500; | 93 const int kBootSplashScreenHideDurationMs = 500; |
94 #endif | 94 #endif |
95 | 95 |
96 // Creates a new window for use as a container. | 96 // Creates a new window for use as a container. |
97 aura::Window* CreateContainer(int window_id, | 97 aura::Window* CreateContainer(int window_id, |
98 const char* name, | 98 const char* name, |
99 aura::Window* parent) { | 99 aura::Window* parent) { |
100 aura::Window* container = new aura::Window(NULL); | 100 aura::Window* container = new aura::Window(NULL); |
101 container->set_id(window_id); | 101 container->set_id(window_id); |
102 container->SetName(name); | 102 container->SetName(name); |
103 container->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 103 container->Init(ui::LAYER_NOT_DRAWN); |
104 parent->AddChild(container); | 104 parent->AddChild(container); |
105 if (window_id != kShellWindowId_UnparentedControlContainer) | 105 if (window_id != kShellWindowId_UnparentedControlContainer) |
106 container->Show(); | 106 container->Show(); |
107 return container; | 107 return container; |
108 } | 108 } |
109 | 109 |
110 float ToRelativeValue(int value, int src, int dst) { | 110 float ToRelativeValue(int value, int src, int dst) { |
111 return static_cast<float>(value) / static_cast<float>(src) * dst; | 111 return static_cast<float>(value) / static_cast<float>(src) * dst; |
112 } | 112 } |
113 | 113 |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 // TODO(harrym): Remove when status area is view. | 756 // TODO(harrym): Remove when status area is view. |
757 aura::Window* status_container = GetContainer(kShellWindowId_StatusContainer); | 757 aura::Window* status_container = GetContainer(kShellWindowId_StatusContainer); |
758 shelf_.reset(new ShelfWidget( | 758 shelf_.reset(new ShelfWidget( |
759 shelf_container, status_container, workspace_controller())); | 759 shelf_container, status_container, workspace_controller())); |
760 | 760 |
761 if (!Shell::GetInstance()->session_state_delegate()-> | 761 if (!Shell::GetInstance()->session_state_delegate()-> |
762 IsActiveUserSessionStarted()) { | 762 IsActiveUserSessionStarted()) { |
763 // This window exists only to be a event target on login screen. | 763 // This window exists only to be a event target on login screen. |
764 // It does not have to handle events, nor be visible. | 764 // It does not have to handle events, nor be visible. |
765 mouse_event_target_.reset(new aura::Window(new EmptyWindowDelegate)); | 765 mouse_event_target_.reset(new aura::Window(new EmptyWindowDelegate)); |
766 mouse_event_target_->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 766 mouse_event_target_->Init(ui::LAYER_NOT_DRAWN); |
767 | 767 |
768 aura::Window* lock_background_container = | 768 aura::Window* lock_background_container = |
769 GetContainer(kShellWindowId_LockScreenBackgroundContainer); | 769 GetContainer(kShellWindowId_LockScreenBackgroundContainer); |
770 lock_background_container->AddChild(mouse_event_target_.get()); | 770 lock_background_container->AddChild(mouse_event_target_.get()); |
771 mouse_event_target_->Show(); | 771 mouse_event_target_->Show(); |
772 } | 772 } |
773 | 773 |
774 // Create Docked windows layout manager | 774 // Create Docked windows layout manager |
775 aura::Window* docked_container = GetContainer(kShellWindowId_DockedContainer); | 775 aura::Window* docked_container = GetContainer(kShellWindowId_DockedContainer); |
776 docked_layout_manager_ = | 776 docked_layout_manager_ = |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 else | 1055 else |
1056 DisableTouchHudProjection(); | 1056 DisableTouchHudProjection(); |
1057 } | 1057 } |
1058 | 1058 |
1059 RootWindowController* GetRootWindowController( | 1059 RootWindowController* GetRootWindowController( |
1060 const aura::Window* root_window) { | 1060 const aura::Window* root_window) { |
1061 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1061 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
1062 } | 1062 } |
1063 | 1063 |
1064 } // namespace ash | 1064 } // namespace ash |
OLD | NEW |