Chromium Code Reviews| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 673 | 673 |
| 674 env_filter_.reset(new ::wm::CompoundEventFilter); | 674 env_filter_.reset(new ::wm::CompoundEventFilter); |
| 675 AddPreTargetHandler(env_filter_.get()); | 675 AddPreTargetHandler(env_filter_.get()); |
| 676 | 676 |
| 677 wm::AshFocusRules* focus_rules = new wm::AshFocusRules(); | 677 wm::AshFocusRules* focus_rules = new wm::AshFocusRules(); |
| 678 | 678 |
| 679 ::wm::FocusController* focus_controller = | 679 ::wm::FocusController* focus_controller = |
| 680 new ::wm::FocusController(focus_rules); | 680 new ::wm::FocusController(focus_rules); |
| 681 focus_client_.reset(focus_controller); | 681 focus_client_.reset(focus_controller); |
| 682 activation_client_ = focus_controller; | 682 activation_client_ = focus_controller; |
| 683 // TODO(sky): Shell should implement ActivationChangeObserver, not WmShell. | |
| 684 activation_client_->AddObserver(wm_shell_.get()); | |
|
James Cook
2017/03/08 02:54:12
nit: I would also add a note that this is cleaned
sky
2017/03/08 05:04:06
I'm going to leave this as the next patch nukes it
| |
| 683 | 685 |
| 684 screen_position_controller_.reset(new ScreenPositionController); | 686 screen_position_controller_.reset(new ScreenPositionController); |
| 685 | 687 |
| 686 wm_shell_->CreatePrimaryHost(); | 688 wm_shell_->CreatePrimaryHost(); |
| 687 wm_shell_->set_root_window_for_new_windows( | 689 wm_shell_->set_root_window_for_new_windows( |
| 688 WmWindow::Get(GetPrimaryRootWindow())); | 690 WmWindow::Get(GetPrimaryRootWindow())); |
| 689 | 691 |
| 690 if (!is_mash) { | 692 if (!is_mash) { |
| 691 resolution_notification_controller_.reset( | 693 resolution_notification_controller_.reset( |
| 692 new ResolutionNotificationController); | 694 new ResolutionNotificationController); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 951 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 953 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { |
| 952 return std::unique_ptr<ui::EventTargetIterator>(); | 954 return std::unique_ptr<ui::EventTargetIterator>(); |
| 953 } | 955 } |
| 954 | 956 |
| 955 ui::EventTargeter* Shell::GetEventTargeter() { | 957 ui::EventTargeter* Shell::GetEventTargeter() { |
| 956 NOTREACHED(); | 958 NOTREACHED(); |
| 957 return nullptr; | 959 return nullptr; |
| 958 } | 960 } |
| 959 | 961 |
| 960 } // namespace ash | 962 } // namespace ash |
| OLD | NEW |