OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/mus/window_manager.h" | 5 #include "ash/mus/window_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void WindowManager::Init( | 101 void WindowManager::Init( |
102 std::unique_ptr<aura::WindowTreeClient> window_tree_client, | 102 std::unique_ptr<aura::WindowTreeClient> window_tree_client, |
103 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool) { | 103 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool) { |
104 DCHECK(window_manager_client_); | 104 DCHECK(window_manager_client_); |
105 DCHECK(!window_tree_client_); | 105 DCHECK(!window_tree_client_); |
106 window_tree_client_ = std::move(window_tree_client); | 106 window_tree_client_ = std::move(window_tree_client); |
107 | 107 |
108 aura::Env::GetInstance()->AddObserver(this); | 108 aura::Env::GetInstance()->AddObserver(this); |
109 | 109 |
110 // |connector_| will be null in some tests. | 110 // |connector_| will be null in some tests. |
111 if (connector_) { | 111 if (connector_) |
112 connector_->ConnectToInterface(ui::mojom::kServiceName, | 112 connector_->BindInterface(ui::mojom::kServiceName, &display_controller_); |
113 &display_controller_); | |
114 } | |
115 | 113 |
116 screen_ = base::MakeUnique<ScreenMus>(); | 114 screen_ = base::MakeUnique<ScreenMus>(); |
117 display::Screen::SetScreenInstance(screen_.get()); | 115 display::Screen::SetScreenInstance(screen_.get()); |
118 | 116 |
119 pointer_watcher_event_router_ = | 117 pointer_watcher_event_router_ = |
120 base::MakeUnique<views::PointerWatcherEventRouter>( | 118 base::MakeUnique<views::PointerWatcherEventRouter>( |
121 window_tree_client_.get()); | 119 window_tree_client_.get()); |
122 | 120 |
123 shadow_controller_ = base::MakeUnique<ShadowController>(); | 121 shadow_controller_ = base::MakeUnique<ShadowController>(); |
124 | 122 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 496 |
499 void WindowManager::OnWindowInitialized(aura::Window* window) { | 497 void WindowManager::OnWindowInitialized(aura::Window* window) { |
500 // This ensures WmWindowAura won't be called before WmWindowMus. This is | 498 // This ensures WmWindowAura won't be called before WmWindowMus. This is |
501 // important as if WmWindowAura::Get() is called first, then WmWindowAura | 499 // important as if WmWindowAura::Get() is called first, then WmWindowAura |
502 // would be created, not WmWindowMus. | 500 // would be created, not WmWindowMus. |
503 WmWindowMus::Get(window); | 501 WmWindowMus::Get(window); |
504 } | 502 } |
505 | 503 |
506 } // namespace mus | 504 } // namespace mus |
507 } // namespace ash | 505 } // namespace ash |
OLD | NEW |