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

Side by Side Diff: ash/shell.cc

Issue 1900443002: Removes aura dependencies from WindowPositioner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke GetWorkAreaForWindowInParent and fix windows 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/shell.h ('k') | ash/shell/content/client/shell_browser_main_parts.cc » ('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "ash/shell_init_params.h" 52 #include "ash/shell_init_params.h"
53 #include "ash/shell_window_ids.h" 53 #include "ash/shell_window_ids.h"
54 #include "ash/system/locale/locale_notification_controller.h" 54 #include "ash/system/locale/locale_notification_controller.h"
55 #include "ash/system/status_area_widget.h" 55 #include "ash/system/status_area_widget.h"
56 #include "ash/system/toast/toast_manager.h" 56 #include "ash/system/toast/toast_manager.h"
57 #include "ash/system/tray/system_tray_delegate.h" 57 #include "ash/system/tray/system_tray_delegate.h"
58 #include "ash/system/tray/system_tray_notifier.h" 58 #include "ash/system/tray/system_tray_notifier.h"
59 #include "ash/utility/partial_screenshot_controller.h" 59 #include "ash/utility/partial_screenshot_controller.h"
60 #include "ash/wm/ash_focus_rules.h" 60 #include "ash/wm/ash_focus_rules.h"
61 #include "ash/wm/ash_native_cursor_manager.h" 61 #include "ash/wm/ash_native_cursor_manager.h"
62 #include "ash/wm/aura/wm_globals_aura.h"
62 #include "ash/wm/coordinate_conversion.h" 63 #include "ash/wm/coordinate_conversion.h"
63 #include "ash/wm/event_client_impl.h" 64 #include "ash/wm/event_client_impl.h"
64 #include "ash/wm/lock_state_controller.h" 65 #include "ash/wm/lock_state_controller.h"
65 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 66 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
66 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" 67 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h"
67 #include "ash/wm/mru_window_tracker.h" 68 #include "ash/wm/mru_window_tracker.h"
68 #include "ash/wm/overlay_event_filter.h" 69 #include "ash/wm/overlay_event_filter.h"
69 #include "ash/wm/overview/window_selector_controller.h" 70 #include "ash/wm/overview/window_selector_controller.h"
70 #include "ash/wm/power_button_controller.h" 71 #include "ash/wm/power_button_controller.h"
71 #include "ash/wm/resize_shadow_controller.h" 72 #include "ash/wm/resize_shadow_controller.h"
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 } 634 }
634 635
635 //////////////////////////////////////////////////////////////////////////////// 636 ////////////////////////////////////////////////////////////////////////////////
636 // Shell, private: 637 // Shell, private:
637 638
638 Shell::Shell(ShellDelegate* delegate, base::SequencedWorkerPool* blocking_pool) 639 Shell::Shell(ShellDelegate* delegate, base::SequencedWorkerPool* blocking_pool)
639 : target_root_window_(nullptr), 640 : target_root_window_(nullptr),
640 scoped_target_root_window_(nullptr), 641 scoped_target_root_window_(nullptr),
641 delegate_(delegate), 642 delegate_(delegate),
642 shelf_model_(new ShelfModel), 643 shelf_model_(new ShelfModel),
643 window_positioner_(new WindowPositioner),
644 activation_client_(nullptr), 644 activation_client_(nullptr),
645 #if defined(OS_CHROMEOS) 645 #if defined(OS_CHROMEOS)
646 display_configurator_(new ui::DisplayConfigurator()), 646 display_configurator_(new ui::DisplayConfigurator()),
647 #endif // defined(OS_CHROMEOS) 647 #endif // defined(OS_CHROMEOS)
648 native_cursor_manager_(nullptr), 648 native_cursor_manager_(nullptr),
649 simulate_modal_window_open_for_testing_(false), 649 simulate_modal_window_open_for_testing_(false),
650 is_touch_hud_projection_enabled_(false), 650 is_touch_hud_projection_enabled_(false),
651 blocking_pool_(blocking_pool) { 651 blocking_pool_(blocking_pool) {
652 DCHECK(delegate_.get()); 652 DCHECK(delegate_.get());
653 DCHECK(aura::Env::GetInstanceDontCreate()); 653 DCHECK(aura::Env::GetInstanceDontCreate());
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 // Ensure that DBusThreadManager outlives this Shell. 845 // Ensure that DBusThreadManager outlives this Shell.
846 DCHECK(chromeos::DBusThreadManager::IsInitialized()); 846 DCHECK(chromeos::DBusThreadManager::IsInitialized());
847 #endif 847 #endif
848 848
849 DCHECK(instance_ == this); 849 DCHECK(instance_ == this);
850 instance_ = nullptr; 850 instance_ = nullptr;
851 } 851 }
852 852
853 void Shell::Init(const ShellInitParams& init_params) { 853 void Shell::Init(const ShellInitParams& init_params) {
854 in_mus_ = init_params.in_mus; 854 in_mus_ = init_params.in_mus;
855
856 wm_globals_.reset(new wm::WmGlobalsAura);
857 window_positioner_.reset(new WindowPositioner(wm_globals_.get()));
858
855 if (!in_mus_) { 859 if (!in_mus_) {
856 native_cursor_manager_ = new AshNativeCursorManager; 860 native_cursor_manager_ = new AshNativeCursorManager;
857 #if defined(OS_CHROMEOS) 861 #if defined(OS_CHROMEOS)
858 cursor_manager_.reset( 862 cursor_manager_.reset(
859 new CursorManager(base::WrapUnique(native_cursor_manager_))); 863 new CursorManager(base::WrapUnique(native_cursor_manager_)));
860 #else 864 #else
861 cursor_manager_.reset( 865 cursor_manager_.reset(
862 new ::wm::CursorManager(base::WrapUnique(native_cursor_manager_))); 866 new ::wm::CursorManager(base::WrapUnique(native_cursor_manager_)));
863 #endif 867 #endif
864 } 868 }
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 1229
1226 void Shell::OnWindowActivated( 1230 void Shell::OnWindowActivated(
1227 aura::client::ActivationChangeObserver::ActivationReason reason, 1231 aura::client::ActivationChangeObserver::ActivationReason reason,
1228 aura::Window* gained_active, 1232 aura::Window* gained_active,
1229 aura::Window* lost_active) { 1233 aura::Window* lost_active) {
1230 if (gained_active) 1234 if (gained_active)
1231 target_root_window_ = gained_active->GetRootWindow(); 1235 target_root_window_ = gained_active->GetRootWindow();
1232 } 1236 }
1233 1237
1234 } // namespace ash 1238 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/shell/content/client/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698