| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 switch (id) { | 84 switch (id) { |
| 85 case kWindowSwitchAccelerator: | 85 case kWindowSwitchAccelerator: |
| 86 window_manager_client()->ActivateNextWindow(); | 86 window_manager_client()->ActivateNextWindow(); |
| 87 break; | 87 break; |
| 88 default: | 88 default: |
| 89 app_->OnAccelerator(id, event); | 89 app_->OnAccelerator(id, event); |
| 90 break; | 90 break; |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 ShelfLayout* RootWindowController::GetShelfLayoutManager() { |
| 95 return static_cast<ShelfLayout*>( |
| 96 layout_manager_[GetWindowForContainer(mojom::Container::USER_SHELF)] |
| 97 .get()); |
| 98 } |
| 99 |
| 94 RootWindowController::RootWindowController(WindowManagerApplication* app) | 100 RootWindowController::RootWindowController(WindowManagerApplication* app) |
| 95 : app_(app), root_(nullptr), window_count_(0) { | 101 : app_(app), root_(nullptr), window_count_(0) { |
| 96 window_manager_.reset(new WindowManager); | 102 window_manager_.reset(new WindowManager); |
| 97 } | 103 } |
| 98 | 104 |
| 99 RootWindowController::~RootWindowController() {} | 105 RootWindowController::~RootWindowController() {} |
| 100 | 106 |
| 101 void RootWindowController::AddAccelerators() { | 107 void RootWindowController::AddAccelerators() { |
| 102 window_manager_client()->AddAccelerator( | 108 window_manager_client()->AddAccelerator( |
| 103 kWindowSwitchAccelerator, | 109 kWindowSwitchAccelerator, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 CreateContainer(mojom::Container::BUBBLES, mojom::Container::ROOT); | 201 CreateContainer(mojom::Container::BUBBLES, mojom::Container::ROOT); |
| 196 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, | 202 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, |
| 197 mojom::Container::ROOT); | 203 mojom::Container::ROOT); |
| 198 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); | 204 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); |
| 199 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); | 205 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); |
| 200 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); | 206 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); |
| 201 } | 207 } |
| 202 | 208 |
| 203 } // namespace wm | 209 } // namespace wm |
| 204 } // namespace mash | 210 } // namespace mash |
| OLD | NEW |