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

Side by Side Diff: ash/shell.cc

Issue 1890583002: Renaming App List Shower to App List Presenter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 4 years, 8 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
« no previous file with comments | « ash/mus/shell_delegate_mus.cc ('k') | ash/shell/shell_delegate_impl.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 #include <utility> 9 #include <utility>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #include "ash/wm/video_detector.h" 77 #include "ash/wm/video_detector.h"
78 #include "ash/wm/window_animations.h" 78 #include "ash/wm/window_animations.h"
79 #include "ash/wm/window_cycle_controller.h" 79 #include "ash/wm/window_cycle_controller.h"
80 #include "ash/wm/window_positioner.h" 80 #include "ash/wm/window_positioner.h"
81 #include "ash/wm/window_properties.h" 81 #include "ash/wm/window_properties.h"
82 #include "ash/wm/window_util.h" 82 #include "ash/wm/window_util.h"
83 #include "ash/wm/workspace_controller.h" 83 #include "ash/wm/workspace_controller.h"
84 #include "base/bind.h" 84 #include "base/bind.h"
85 #include "base/memory/ptr_util.h" 85 #include "base/memory/ptr_util.h"
86 #include "base/trace_event/trace_event.h" 86 #include "base/trace_event/trace_event.h"
87 #include "ui/app_list/shower/app_list_shower.h" 87 #include "ui/app_list/presenter/app_list_presenter.h"
88 #include "ui/aura/client/aura_constants.h" 88 #include "ui/aura/client/aura_constants.h"
89 #include "ui/aura/env.h" 89 #include "ui/aura/env.h"
90 #include "ui/aura/layout_manager.h" 90 #include "ui/aura/layout_manager.h"
91 #include "ui/aura/window.h" 91 #include "ui/aura/window.h"
92 #include "ui/aura/window_event_dispatcher.h" 92 #include "ui/aura/window_event_dispatcher.h"
93 #include "ui/base/ui_base_switches.h" 93 #include "ui/base/ui_base_switches.h"
94 #include "ui/base/user_activity/user_activity_detector.h" 94 #include "ui/base/user_activity/user_activity_detector.h"
95 #include "ui/compositor/layer.h" 95 #include "ui/compositor/layer.h"
96 #include "ui/compositor/layer_animator.h" 96 #include "ui/compositor/layer_animator.h"
97 #include "ui/events/event_target_iterator.h" 97 #include "ui/events/event_target_iterator.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 aura::Window* root = 292 aura::Window* root =
293 wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size())); 293 wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size()));
294 GetRootWindowController(root) 294 GetRootWindowController(root)
295 ->ShowContextMenu(location_in_screen, source_type); 295 ->ShowContextMenu(location_in_screen, source_type);
296 } 296 }
297 297
298 void Shell::ShowAppList(aura::Window* window) { 298 void Shell::ShowAppList(aura::Window* window) {
299 // If the context window is not given, show it on the target root window. 299 // If the context window is not given, show it on the target root window.
300 if (!window) 300 if (!window)
301 window = GetTargetRootWindow(); 301 window = GetTargetRootWindow();
302 delegate_->GetAppListShower()->Show(window); 302 delegate_->GetAppListPresenter()->Show(window);
303 } 303 }
304 304
305 void Shell::DismissAppList() { 305 void Shell::DismissAppList() {
306 delegate_->GetAppListShower()->Dismiss(); 306 delegate_->GetAppListPresenter()->Dismiss();
307 } 307 }
308 308
309 void Shell::ToggleAppList(aura::Window* window) { 309 void Shell::ToggleAppList(aura::Window* window) {
310 if (delegate_->GetAppListShower()->IsVisible()) { 310 if (delegate_->GetAppListPresenter()->IsVisible()) {
311 DismissAppList(); 311 DismissAppList();
312 return; 312 return;
313 } 313 }
314 314
315 ShowAppList(window); 315 ShowAppList(window);
316 } 316 }
317 317
318 bool Shell::GetAppListTargetVisibility() const { 318 bool Shell::GetAppListTargetVisibility() const {
319 return delegate_->GetAppListShower()->GetTargetVisibility(); 319 return delegate_->GetAppListPresenter()->GetTargetVisibility();
320 } 320 }
321 321
322 bool Shell::IsSystemModalWindowOpen() const { 322 bool Shell::IsSystemModalWindowOpen() const {
323 if (simulate_modal_window_open_for_testing_) 323 if (simulate_modal_window_open_for_testing_)
324 return true; 324 return true;
325 const std::vector<aura::Window*> containers = GetContainersFromAllRootWindows( 325 const std::vector<aura::Window*> containers = GetContainersFromAllRootWindows(
326 kShellWindowId_SystemModalContainer, nullptr); 326 kShellWindowId_SystemModalContainer, nullptr);
327 for (std::vector<aura::Window*>::const_iterator cit = containers.begin(); 327 for (std::vector<aura::Window*>::const_iterator cit = containers.begin();
328 cit != containers.end(); ++cit) { 328 cit != containers.end(); ++cit) {
329 for (aura::Window::Windows::const_iterator wit = (*cit)->children().begin(); 329 for (aura::Window::Windows::const_iterator wit = (*cit)->children().begin();
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 1204
1205 void Shell::OnWindowActivated( 1205 void Shell::OnWindowActivated(
1206 aura::client::ActivationChangeObserver::ActivationReason reason, 1206 aura::client::ActivationChangeObserver::ActivationReason reason,
1207 aura::Window* gained_active, 1207 aura::Window* gained_active,
1208 aura::Window* lost_active) { 1208 aura::Window* lost_active) {
1209 if (gained_active) 1209 if (gained_active)
1210 target_root_window_ = gained_active->GetRootWindow(); 1210 target_root_window_ = gained_active->GetRootWindow();
1211 } 1211 }
1212 1212
1213 } // namespace ash 1213 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/shell_delegate_mus.cc ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698