Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Unified Diff: ash/shell.cc

Issue 2750483005: Moves app_list() and related functions from Shell to WmShell (Closed)
Patch Set: dont explicitly delete Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.h ('k') | ash/shell/app_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index e416444de8cb9ff394d8c4130576e80ec77696aa..e0f42429451b6e933e2e98520b3dab8066fe1636 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -111,6 +111,7 @@
#include "services/preferences/public/interfaces/preferences.mojom.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/ui/public/interfaces/constants.mojom.h"
+#include "ui/app_list/presenter/app_list.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/layout_manager.h"
@@ -418,6 +419,30 @@ void Shell::RemoveShellObserver(ShellObserver* observer) {
shell_observers_.RemoveObserver(observer);
}
+void Shell::ShowAppList() {
+ // Show the app list on the default display for new windows.
+ app_list_->Show(
+ GetWmRootWindowForNewWindows()->GetDisplayNearestWindow().id());
+}
+
+void Shell::DismissAppList() {
+ app_list_->Dismiss();
+}
+
+void Shell::ToggleAppList() {
+ // Toggle the app list on the default display for new windows.
+ app_list_->ToggleAppList(
+ GetWmRootWindowForNewWindows()->GetDisplayNearestWindow().id());
+}
+
+bool Shell::IsAppListVisible() const {
+ return app_list_->IsVisible();
+}
+
+bool Shell::GetAppListTargetVisibility() const {
+ return app_list_->GetTargetVisibility();
+}
+
void Shell::NotifyMaximizeModeStarted() {
for (auto& observer : shell_observers_)
observer.OnMaximizeModeStarted();
@@ -481,6 +506,7 @@ Shell::Shell(std::unique_ptr<ShellDelegate> shell_delegate,
std::unique_ptr<WmShell> wm_shell)
: wm_shell_(std::move(wm_shell)),
shell_delegate_(std::move(shell_delegate)),
+ app_list_(base::MakeUnique<app_list::AppList>()),
link_handler_model_factory_(nullptr),
display_configurator_(new display::DisplayConfigurator()),
native_cursor_manager_(nullptr),
« no previous file with comments | « ash/shell.h ('k') | ash/shell/app_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698