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

Side by Side Diff: ash/shell.cc

Issue 2647833003: Adds AppListDelegate to AppList that is notified on visibility changes (Closed)
Patch Set: move Created 3 years, 11 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/shell.h ('k') | ui/app_list/presenter/BUILD.gn » ('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
11 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 11 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
12 #include "ash/accelerators/accelerator_delegate.h" 12 #include "ash/accelerators/accelerator_delegate.h"
13 #include "ash/accelerators/magnifier_key_scroller.h" 13 #include "ash/accelerators/magnifier_key_scroller.h"
14 #include "ash/accelerators/spoken_feedback_toggler.h" 14 #include "ash/accelerators/spoken_feedback_toggler.h"
15 #include "ash/app_list/app_list_delegate_impl.h"
15 #include "ash/aura/wm_shell_aura.h" 16 #include "ash/aura/wm_shell_aura.h"
16 #include "ash/autoclick/autoclick_controller.h" 17 #include "ash/autoclick/autoclick_controller.h"
17 #include "ash/common/accelerators/accelerator_controller.h" 18 #include "ash/common/accelerators/accelerator_controller.h"
18 #include "ash/common/ash_constants.h" 19 #include "ash/common/ash_constants.h"
19 #include "ash/common/frame/custom_frame_view_ash.h" 20 #include "ash/common/frame/custom_frame_view_ash.h"
20 #include "ash/common/gpu_support.h" 21 #include "ash/common/gpu_support.h"
21 #include "ash/common/keyboard/keyboard_ui.h" 22 #include "ash/common/keyboard/keyboard_ui.h"
22 #include "ash/common/login_status.h" 23 #include "ash/common/login_status.h"
23 #include "ash/common/session/session_state_delegate.h" 24 #include "ash/common/session/session_state_delegate.h"
24 #include "ash/common/shelf/app_list_shelf_item_delegate.h" 25 #include "ash/common/shelf/app_list_shelf_item_delegate.h"
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 laser_pointer_controller_.reset(); 524 laser_pointer_controller_.reset();
524 partial_magnification_controller_.reset(); 525 partial_magnification_controller_.reset();
525 526
526 // This also deletes all RootWindows. Note that we invoke Shutdown() on 527 // This also deletes all RootWindows. Note that we invoke Shutdown() on
527 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since 528 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since
528 // destruction 529 // destruction
529 // of its owned RootWindowControllers relies on the value. 530 // of its owned RootWindowControllers relies on the value.
530 ScreenAsh::CreateScreenForShutdown(); 531 ScreenAsh::CreateScreenForShutdown();
531 display_configuration_controller_.reset(); 532 display_configuration_controller_.reset();
532 533
534 // AppListDelegateImpl depends upon AppList.
535 app_list_delegate_impl_.reset();
536
533 wm_shell_->Shutdown(); 537 wm_shell_->Shutdown();
534 // Depends on |focus_client_|, so must be destroyed before. 538 // Depends on |focus_client_|, so must be destroyed before.
535 window_tree_host_manager_.reset(); 539 window_tree_host_manager_.reset();
536 focus_client_.reset(); 540 focus_client_.reset();
537 screen_position_controller_.reset(); 541 screen_position_controller_.reset();
538 542
539 keyboard::KeyboardController::ResetInstance(nullptr); 543 keyboard::KeyboardController::ResetInstance(nullptr);
540 544
541 display_color_manager_.reset(); 545 display_color_manager_.reset();
542 if (display_change_observer_) 546 if (display_change_observer_)
(...skipping 17 matching lines...) Expand all
560 564
561 DCHECK(instance_ == this); 565 DCHECK(instance_ == this);
562 instance_ = nullptr; 566 instance_ = nullptr;
563 } 567 }
564 568
565 void Shell::Init(const ShellInitParams& init_params) { 569 void Shell::Init(const ShellInitParams& init_params) {
566 const bool is_mash = wm_shell_->IsRunningInMash(); 570 const bool is_mash = wm_shell_->IsRunningInMash();
567 571
568 wm_shell_->Initialize(init_params.blocking_pool); 572 wm_shell_->Initialize(init_params.blocking_pool);
569 573
574 if (is_mash)
575 app_list_delegate_impl_ = base::MakeUnique<AppListDelegateImpl>();
576
570 // TODO(sky): move creation to WmShell. 577 // TODO(sky): move creation to WmShell.
571 if (!is_mash) 578 if (!is_mash)
572 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryAsh>(); 579 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryAsh>();
573 580
574 scoped_overview_animation_settings_factory_.reset( 581 scoped_overview_animation_settings_factory_.reset(
575 new ScopedOverviewAnimationSettingsFactoryAura); 582 new ScopedOverviewAnimationSettingsFactoryAura);
576 window_positioner_.reset(new WindowPositioner(wm_shell_.get())); 583 window_positioner_.reset(new WindowPositioner(wm_shell_.get()));
577 584
578 if (!is_mash) { 585 if (!is_mash) {
579 native_cursor_manager_ = new AshNativeCursorManager; 586 native_cursor_manager_ = new AshNativeCursorManager;
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { 924 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
918 return std::unique_ptr<ui::EventTargetIterator>(); 925 return std::unique_ptr<ui::EventTargetIterator>();
919 } 926 }
920 927
921 ui::EventTargeter* Shell::GetEventTargeter() { 928 ui::EventTargeter* Shell::GetEventTargeter() {
922 NOTREACHED(); 929 NOTREACHED();
923 return nullptr; 930 return nullptr;
924 } 931 }
925 932
926 } // namespace ash 933 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ui/app_list/presenter/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698