Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: ui/views/mus/window_manager_connection.cc

Issue 2249413004: services/ui: Allow injecting the IO thread task runner for gpu channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« services/ui/public/cpp/gpu_service.cc ('K') | « services/ui/public/cpp/gpu_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698