| 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 "ui/views/mus/window_manager_connection.h" | 5 #include "ui/views/mus/window_manager_connection.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const { | 103 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const { |
| 104 return client_->GetRoots(); | 104 return client_->GetRoots(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 WindowManagerConnection::WindowManagerConnection( | 107 WindowManagerConnection::WindowManagerConnection( |
| 108 shell::Connector* connector, | 108 shell::Connector* connector, |
| 109 const shell::Identity& identity) | 109 const shell::Identity& identity) |
| 110 : connector_(connector), identity_(identity) { | 110 : connector_(connector), identity_(identity) { |
| 111 lazy_tls_ptr.Pointer()->Set(this); | 111 lazy_tls_ptr.Pointer()->Set(this); |
| 112 | 112 |
| 113 gpu_service_ = ui::GpuService::Initialize(connector); | 113 gpu_service_ = ui::GpuService::Create(connector); |
| 114 compositor_context_factory_.reset( | 114 compositor_context_factory_.reset( |
| 115 new views::SurfaceContextFactory(gpu_service_.get())); | 115 new views::SurfaceContextFactory(gpu_service_.get())); |
| 116 aura::Env::GetInstance()->set_context_factory( | 116 aura::Env::GetInstance()->set_context_factory( |
| 117 compositor_context_factory_.get()); | 117 compositor_context_factory_.get()); |
| 118 client_.reset(new ui::WindowTreeClient(this, nullptr, nullptr)); | 118 client_.reset(new ui::WindowTreeClient(this, nullptr, nullptr)); |
| 119 client_->ConnectViaWindowTreeFactory(connector_); | 119 client_->ConnectViaWindowTreeFactory(connector_); |
| 120 | 120 |
| 121 pointer_watcher_event_router_.reset( | 121 pointer_watcher_event_router_.reset( |
| 122 new PointerWatcherEventRouter(client_.get())); | 122 new PointerWatcherEventRouter(client_.get())); |
| 123 | 123 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { | 160 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { |
| 161 return client_->GetCursorScreenPoint(); | 161 return client_->GetCursorScreenPoint(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 std::unique_ptr<OSExchangeData::Provider> | 164 std::unique_ptr<OSExchangeData::Provider> |
| 165 WindowManagerConnection::BuildProvider() { | 165 WindowManagerConnection::BuildProvider() { |
| 166 return base::MakeUnique<OSExchangeDataProviderMus>(); | 166 return base::MakeUnique<OSExchangeDataProviderMus>(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace views | 169 } // namespace views |
| OLD | NEW |