OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "mash/wm/root_window_controller.h" | 5 #include "mash/wm/root_window_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "components/mus/common/util.h" | 10 #include "components/mus/common/util.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 switch (id) { | 86 switch (id) { |
87 case kWindowSwitchAccelerator: | 87 case kWindowSwitchAccelerator: |
88 window_manager_client()->ActivateNextWindow(); | 88 window_manager_client()->ActivateNextWindow(); |
89 break; | 89 break; |
90 default: | 90 default: |
91 app_->OnAccelerator(id, event); | 91 app_->OnAccelerator(id, event); |
92 break; | 92 break; |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
| 96 LayoutManager* RootWindowController::GetLayoutManagerForContainer( |
| 97 mojom::Container container) { |
| 98 return layout_manager_[GetWindowForContainer(container)].get(); |
| 99 } |
| 100 |
96 RootWindowController::RootWindowController(WindowManagerApplication* app) | 101 RootWindowController::RootWindowController(WindowManagerApplication* app) |
97 : app_(app), root_(nullptr), window_count_(0) { | 102 : app_(app), root_(nullptr), window_count_(0) { |
98 window_manager_.reset(new WindowManager); | 103 window_manager_.reset(new WindowManager); |
99 } | 104 } |
100 | 105 |
101 RootWindowController::~RootWindowController() {} | 106 RootWindowController::~RootWindowController() {} |
102 | 107 |
103 void RootWindowController::AddAccelerators() { | 108 void RootWindowController::AddAccelerators() { |
104 window_manager_client()->AddAccelerator( | 109 window_manager_client()->AddAccelerator( |
105 kWindowSwitchAccelerator, | 110 kWindowSwitchAccelerator, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 mojom::Container::LOGIN_WINDOWS); | 200 mojom::Container::LOGIN_WINDOWS); |
196 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, | 201 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, |
197 mojom::Container::ROOT); | 202 mojom::Container::ROOT); |
198 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); | 203 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); |
199 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); | 204 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); |
200 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); | 205 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); |
201 } | 206 } |
202 | 207 |
203 } // namespace wm | 208 } // namespace wm |
204 } // namespace mash | 209 } // namespace mash |
OLD | NEW |