| 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 "ash/common/wm_shell.h" | 5 #include "ash/common/wm_shell.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
| 10 #include "ash/common/accelerators/ash_focus_manager_factory.h" | 10 #include "ash/common/accelerators/ash_focus_manager_factory.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 return true; | 160 return true; |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 return false; | 164 return false; |
| 165 } | 165 } |
| 166 | 166 |
| 167 void WmShell::ShowAppList() { | 167 void WmShell::ShowAppList() { |
| 168 // Show the app list on the default display for new windows. | 168 // Show the app list on the default display for new windows. |
| 169 int64_t display_id = | 169 int64_t display_id = |
| 170 GetRootWindowForNewWindows()->GetDisplayNearestWindow().id(); | 170 root_window_for_new_windows_->GetDisplayNearestWindow().id(); |
| 171 delegate_->GetAppListPresenter()->Show(display_id); | 171 delegate_->GetAppListPresenter()->Show(display_id); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void WmShell::DismissAppList() { | 174 void WmShell::DismissAppList() { |
| 175 delegate_->GetAppListPresenter()->Dismiss(); | 175 delegate_->GetAppListPresenter()->Dismiss(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void WmShell::ToggleAppList() { | 178 void WmShell::ToggleAppList() { |
| 179 // Show the app list on the default display for new windows. | 179 // Show the app list on the default display for new windows. |
| 180 int64_t display_id = | 180 int64_t display_id = |
| 181 GetRootWindowForNewWindows()->GetDisplayNearestWindow().id(); | 181 root_window_for_new_windows_->GetDisplayNearestWindow().id(); |
| 182 delegate_->GetAppListPresenter()->ToggleAppList(display_id); | 182 delegate_->GetAppListPresenter()->ToggleAppList(display_id); |
| 183 } | 183 } |
| 184 | 184 |
| 185 bool WmShell::IsApplistVisible() const { | 185 bool WmShell::IsApplistVisible() const { |
| 186 return delegate_->GetAppListPresenter()->IsVisible(); | 186 return delegate_->GetAppListPresenter()->IsVisible(); |
| 187 } | 187 } |
| 188 | 188 |
| 189 bool WmShell::GetAppListTargetVisibility() const { | 189 bool WmShell::GetAppListTargetVisibility() const { |
| 190 return delegate_->GetAppListPresenter()->GetTargetVisibility(); | 190 return delegate_->GetAppListPresenter()->GetTargetVisibility(); |
| 191 } | 191 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 void WmShell::DeleteToastManager() { | 255 void WmShell::DeleteToastManager() { |
| 256 toast_manager_.reset(); | 256 toast_manager_.reset(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 void WmShell::SetAcceleratorController( | 259 void WmShell::SetAcceleratorController( |
| 260 std::unique_ptr<AcceleratorController> accelerator_controller) { | 260 std::unique_ptr<AcceleratorController> accelerator_controller) { |
| 261 accelerator_controller_ = std::move(accelerator_controller); | 261 accelerator_controller_ = std::move(accelerator_controller); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace ash | 264 } // namespace ash |
| OLD | NEW |