OLD | NEW |
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 19 matching lines...) Expand all Loading... |
30 #include "ash/gpu_support.h" | 30 #include "ash/gpu_support.h" |
31 #include "ash/high_contrast/high_contrast_controller.h" | 31 #include "ash/high_contrast/high_contrast_controller.h" |
32 #include "ash/host/ash_window_tree_host_init_params.h" | 32 #include "ash/host/ash_window_tree_host_init_params.h" |
33 #include "ash/ime/input_method_event_handler.h" | 33 #include "ash/ime/input_method_event_handler.h" |
34 #include "ash/keyboard/keyboard_ui.h" | 34 #include "ash/keyboard/keyboard_ui.h" |
35 #include "ash/keyboard_uma_event_filter.h" | 35 #include "ash/keyboard_uma_event_filter.h" |
36 #include "ash/magnifier/magnification_controller.h" | 36 #include "ash/magnifier/magnification_controller.h" |
37 #include "ash/magnifier/partial_magnification_controller.h" | 37 #include "ash/magnifier/partial_magnification_controller.h" |
38 #include "ash/media_delegate.h" | 38 #include "ash/media_delegate.h" |
39 #include "ash/new_window_delegate.h" | 39 #include "ash/new_window_delegate.h" |
| 40 #include "ash/renderer_context_menu/open_with_menu_controller.h" |
40 #include "ash/root_window_controller.h" | 41 #include "ash/root_window_controller.h" |
41 #include "ash/session/session_state_delegate.h" | 42 #include "ash/session/session_state_delegate.h" |
42 #include "ash/shelf/app_list_shelf_item_delegate.h" | 43 #include "ash/shelf/app_list_shelf_item_delegate.h" |
43 #include "ash/shelf/shelf_delegate.h" | 44 #include "ash/shelf/shelf_delegate.h" |
44 #include "ash/shelf/shelf_item_delegate.h" | 45 #include "ash/shelf/shelf_item_delegate.h" |
45 #include "ash/shelf/shelf_item_delegate_manager.h" | 46 #include "ash/shelf/shelf_item_delegate_manager.h" |
46 #include "ash/shelf/shelf_layout_manager.h" | 47 #include "ash/shelf/shelf_layout_manager.h" |
47 #include "ash/shelf/shelf_model.h" | 48 #include "ash/shelf/shelf_model.h" |
48 #include "ash/shelf/shelf_widget.h" | 49 #include "ash/shelf/shelf_widget.h" |
49 #include "ash/shelf/shelf_window_watcher.h" | 50 #include "ash/shelf/shelf_window_watcher.h" |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 } | 637 } |
637 | 638 |
638 //////////////////////////////////////////////////////////////////////////////// | 639 //////////////////////////////////////////////////////////////////////////////// |
639 // Shell, private: | 640 // Shell, private: |
640 | 641 |
641 Shell::Shell(ShellDelegate* delegate, base::SequencedWorkerPool* blocking_pool) | 642 Shell::Shell(ShellDelegate* delegate, base::SequencedWorkerPool* blocking_pool) |
642 : target_root_window_(nullptr), | 643 : target_root_window_(nullptr), |
643 scoped_target_root_window_(nullptr), | 644 scoped_target_root_window_(nullptr), |
644 delegate_(delegate), | 645 delegate_(delegate), |
645 window_positioner_(new WindowPositioner), | 646 window_positioner_(new WindowPositioner), |
| 647 open_with_menu_controller_(new OpenWithMenuController), |
646 activation_client_(nullptr), | 648 activation_client_(nullptr), |
647 #if defined(OS_CHROMEOS) | 649 #if defined(OS_CHROMEOS) |
648 display_configurator_(new ui::DisplayConfigurator()), | 650 display_configurator_(new ui::DisplayConfigurator()), |
649 #endif // defined(OS_CHROMEOS) | 651 #endif // defined(OS_CHROMEOS) |
650 native_cursor_manager_(nullptr), | 652 native_cursor_manager_(nullptr), |
651 simulate_modal_window_open_for_testing_(false), | 653 simulate_modal_window_open_for_testing_(false), |
652 is_touch_hud_projection_enabled_(false), | 654 is_touch_hud_projection_enabled_(false), |
653 blocking_pool_(blocking_pool) { | 655 blocking_pool_(blocking_pool) { |
654 DCHECK(delegate_.get()); | 656 DCHECK(delegate_.get()); |
655 DCHECK(aura::Env::GetInstanceDontCreate()); | 657 DCHECK(aura::Env::GetInstanceDontCreate()); |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 | 1215 |
1214 void Shell::OnWindowActivated( | 1216 void Shell::OnWindowActivated( |
1215 aura::client::ActivationChangeObserver::ActivationReason reason, | 1217 aura::client::ActivationChangeObserver::ActivationReason reason, |
1216 aura::Window* gained_active, | 1218 aura::Window* gained_active, |
1217 aura::Window* lost_active) { | 1219 aura::Window* lost_active) { |
1218 if (gained_active) | 1220 if (gained_active) |
1219 target_root_window_ = gained_active->GetRootWindow(); | 1221 target_root_window_ = gained_active->GetRootWindow(); |
1220 } | 1222 } |
1221 | 1223 |
1222 } // namespace ash | 1224 } // namespace ash |
OLD | NEW |