| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ui/views/mus/mus_client.h" | 5 #include "ui/views/mus/mus_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "services/service_manager/public/cpp/connection.h" | 9 #include "services/service_manager/public/cpp/connection.h" |
| 10 #include "services/service_manager/public/cpp/connector.h" | 10 #include "services/service_manager/public/cpp/connector.h" |
| 11 #include "services/ui/public/cpp/gpu/gpu_service.h" |
| 11 #include "services/ui/public/interfaces/event_matcher.mojom.h" | 12 #include "services/ui/public/interfaces/event_matcher.mojom.h" |
| 12 #include "ui/aura/env.h" | 13 #include "ui/aura/env.h" |
| 13 #include "ui/aura/mus/gpu_service.h" | |
| 14 #include "ui/aura/mus/mus_context_factory.h" | 14 #include "ui/aura/mus/mus_context_factory.h" |
| 15 #include "ui/aura/mus/os_exchange_data_provider_mus.h" | 15 #include "ui/aura/mus/os_exchange_data_provider_mus.h" |
| 16 #include "ui/aura/mus/property_converter.h" | 16 #include "ui/aura/mus/property_converter.h" |
| 17 #include "ui/aura/mus/window_tree_client.h" | 17 #include "ui/aura/mus/window_tree_client.h" |
| 18 #include "ui/aura/mus/window_tree_host_mus.h" | 18 #include "ui/aura/mus/window_tree_host_mus.h" |
| 19 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
| 20 #include "ui/aura/window_tree_host.h" | 20 #include "ui/aura/window_tree_host.h" |
| 21 #include "ui/views/mus/aura_init.h" | 21 #include "ui/views/mus/aura_init.h" |
| 22 #include "ui/views/mus/clipboard_mus.h" | 22 #include "ui/views/mus/clipboard_mus.h" |
| 23 #include "ui/views/mus/desktop_window_tree_host_mus.h" | 23 #include "ui/views/mus/desktop_window_tree_host_mus.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 const service_manager::Identity& identity, | 82 const service_manager::Identity& identity, |
| 83 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) | 83 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) |
| 84 : connector_(connector), identity_(identity) { | 84 : connector_(connector), identity_(identity) { |
| 85 DCHECK(!instance_); | 85 DCHECK(!instance_); |
| 86 instance_ = this; | 86 instance_ = this; |
| 87 // TODO(msw): Avoid this... use some default value? Allow clients to extend? | 87 // TODO(msw): Avoid this... use some default value? Allow clients to extend? |
| 88 property_converter_ = base::MakeUnique<aura::PropertyConverter>(); | 88 property_converter_ = base::MakeUnique<aura::PropertyConverter>(); |
| 89 | 89 |
| 90 wm_state_ = base::MakeUnique<wm::WMState>(); | 90 wm_state_ = base::MakeUnique<wm::WMState>(); |
| 91 | 91 |
| 92 gpu_service_ = aura::GpuService::Create(connector, std::move(io_task_runner)); | 92 gpu_service_ = ui::GpuService::Create(connector, std::move(io_task_runner)); |
| 93 compositor_context_factory_ = | 93 compositor_context_factory_ = |
| 94 base::MakeUnique<aura::MusContextFactory>(gpu_service_.get()); | 94 base::MakeUnique<aura::MusContextFactory>(gpu_service_.get()); |
| 95 aura::Env::GetInstance()->set_context_factory( | 95 aura::Env::GetInstance()->set_context_factory( |
| 96 compositor_context_factory_.get()); | 96 compositor_context_factory_.get()); |
| 97 window_tree_client_ = | 97 window_tree_client_ = |
| 98 base::MakeUnique<aura::WindowTreeClient>(this, nullptr, nullptr); | 98 base::MakeUnique<aura::WindowTreeClient>(this, nullptr, nullptr); |
| 99 aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_.get()); | 99 aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_.get()); |
| 100 window_tree_client_->ConnectViaWindowTreeFactory(connector_); | 100 window_tree_client_->ConnectViaWindowTreeFactory(connector_); |
| 101 | 101 |
| 102 // TODO: wire up PointerWatcherEventRouter. http://crbug.com/663526. | 102 // TODO: wire up PointerWatcherEventRouter. http://crbug.com/663526. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 return root->GetTopWindowContainingPoint(relative_point); | 162 return root->GetTopWindowContainingPoint(relative_point); |
| 163 } | 163 } |
| 164 return nullptr; | 164 return nullptr; |
| 165 } | 165 } |
| 166 | 166 |
| 167 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { | 167 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { |
| 168 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); | 168 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace views | 171 } // namespace views |
| OLD | NEW |