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

Side by Side Diff: ash/shell.cc

Issue 485453003: Split AppListController::SetVisible into Show and Dismiss. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/wm/app_list_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 GetRootWindowController(root) 291 GetRootWindowController(root)
292 ->ShowContextMenu(location_in_screen, source_type); 292 ->ShowContextMenu(location_in_screen, source_type);
293 } 293 }
294 294
295 void Shell::ShowAppList(aura::Window* window) { 295 void Shell::ShowAppList(aura::Window* window) {
296 // If the context window is not given, show it on the target root window. 296 // If the context window is not given, show it on the target root window.
297 if (!window) 297 if (!window)
298 window = GetTargetRootWindow(); 298 window = GetTargetRootWindow();
299 if (!app_list_controller_) 299 if (!app_list_controller_)
300 app_list_controller_.reset(new AppListController); 300 app_list_controller_.reset(new AppListController);
301 app_list_controller_->SetVisible(true, window); 301 app_list_controller_->Show(window);
302 } 302 }
303 303
304 void Shell::DismissAppList() { 304 void Shell::DismissAppList() {
305 if (!app_list_controller_) 305 if (!app_list_controller_)
306 return; 306 return;
307 app_list_controller_->SetVisible(false, GetTargetRootWindow()); 307 app_list_controller_->Dismiss();
308 } 308 }
309 309
310 void Shell::ToggleAppList(aura::Window* window) { 310 void Shell::ToggleAppList(aura::Window* window) {
311 if (app_list_controller_ && app_list_controller_->IsVisible()) { 311 if (app_list_controller_ && app_list_controller_->IsVisible()) {
312 DismissAppList(); 312 DismissAppList();
313 return; 313 return;
314 } 314 }
315 315
316 ShowAppList(window); 316 ShowAppList(window);
317 } 317 }
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 //////////////////////////////////////////////////////////////////////////////// 1151 ////////////////////////////////////////////////////////////////////////////////
1152 // Shell, aura::client::ActivationChangeObserver implementation: 1152 // Shell, aura::client::ActivationChangeObserver implementation:
1153 1153
1154 void Shell::OnWindowActivated(aura::Window* gained_active, 1154 void Shell::OnWindowActivated(aura::Window* gained_active,
1155 aura::Window* lost_active) { 1155 aura::Window* lost_active) {
1156 if (gained_active) 1156 if (gained_active)
1157 target_root_window_ = gained_active->GetRootWindow(); 1157 target_root_window_ = gained_active->GetRootWindow();
1158 } 1158 }
1159 1159
1160 } // namespace ash 1160 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/app_list_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698