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

Unified Diff: ash/shell.cc

Issue 460933002: Split Shell::ToggleAppList() into ShowAppList and DismissAppList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 2c393065aba614f7c7caa01fa365b5f490a2a9c8..7be45ab13458438fde5880313d10175a76464dac 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -292,13 +292,19 @@ void Shell::ShowContextMenu(const gfx::Point& location_in_screen,
->ShowContextMenu(location_in_screen, source_type);
}
-void Shell::ToggleAppList(aura::Window* window) {
+void Shell::ShowAppList(aura::Window* window) {
// If the context window is not given, show it on the target root window.
if (!window)
window = GetTargetRootWindow();
if (!app_list_controller_)
app_list_controller_.reset(new AppListController);
- app_list_controller_->SetVisible(!app_list_controller_->IsVisible(), window);
+ app_list_controller_->SetVisible(true, window);
+}
+
+void Shell::DismissAppList() {
+ if (!app_list_controller_)
+ return;
+ app_list_controller_->SetVisible(false, GetTargetRootWindow());
Matt Giuca 2014/08/14 04:17:07 Are you sure this is equivalent? i.e., does AppLis
calamity 2014/08/14 05:00:59 I checked the method definition and it looks fine.
Matt Giuca 2014/08/14 05:05:36 Acknowledged.
}
bool Shell::GetAppListTargetVisibility() const {

Powered by Google App Engine
This is Rietveld 408576698