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

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

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | ui/views/mus/window_tree_host_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 lazy_tls_ptr.Pointer()->Set(nullptr); 83 lazy_tls_ptr.Pointer()->Set(nullptr);
84 84
85 if (ViewsDelegate::GetInstance()) { 85 if (ViewsDelegate::GetInstance()) {
86 ViewsDelegate::GetInstance()->set_native_widget_factory( 86 ViewsDelegate::GetInstance()->set_native_widget_factory(
87 ViewsDelegate::NativeWidgetFactory()); 87 ViewsDelegate::NativeWidgetFactory());
88 } 88 }
89 } 89 }
90 90
91 // static 91 // static
92 std::unique_ptr<WindowManagerConnection> WindowManagerConnection::Create( 92 std::unique_ptr<WindowManagerConnection> WindowManagerConnection::Create(
93 shell::Connector* connector, 93 service_manager::Connector* connector,
94 const shell::Identity& identity, 94 const service_manager::Identity& identity,
95 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { 95 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
96 DCHECK(!lazy_tls_ptr.Pointer()->Get()); 96 DCHECK(!lazy_tls_ptr.Pointer()->Get());
97 WindowManagerConnection* connection = 97 WindowManagerConnection* connection =
98 new WindowManagerConnection(connector, identity, std::move(task_runner)); 98 new WindowManagerConnection(connector, identity, std::move(task_runner));
99 DCHECK(lazy_tls_ptr.Pointer()->Get()); 99 DCHECK(lazy_tls_ptr.Pointer()->Get());
100 return base::WrapUnique(connection); 100 return base::WrapUnique(connection);
101 } 101 }
102 102
103 // static 103 // static
104 WindowManagerConnection* WindowManagerConnection::Get() { 104 WindowManagerConnection* WindowManagerConnection::Get() {
(...skipping 27 matching lines...) Expand all
132 mojo::ConvertTo<std::vector<uint8_t>>(identity_.name()); 132 mojo::ConvertTo<std::vector<uint8_t>>(identity_.name());
133 return new NativeWidgetMus(delegate, NewTopLevelWindow(properties), 133 return new NativeWidgetMus(delegate, NewTopLevelWindow(properties),
134 ui::mojom::SurfaceType::DEFAULT); 134 ui::mojom::SurfaceType::DEFAULT);
135 } 135 }
136 136
137 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const { 137 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const {
138 return client_->GetRoots(); 138 return client_->GetRoots();
139 } 139 }
140 140
141 WindowManagerConnection::WindowManagerConnection( 141 WindowManagerConnection::WindowManagerConnection(
142 shell::Connector* connector, 142 service_manager::Connector* connector,
143 const shell::Identity& identity, 143 const service_manager::Identity& identity,
144 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 144 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
145 : connector_(connector), identity_(identity) { 145 : connector_(connector), identity_(identity) {
146 lazy_tls_ptr.Pointer()->Set(this); 146 lazy_tls_ptr.Pointer()->Set(this);
147 147
148 gpu_service_ = ui::GpuService::Create(connector, std::move(task_runner)); 148 gpu_service_ = ui::GpuService::Create(connector, std::move(task_runner));
149 compositor_context_factory_ = 149 compositor_context_factory_ =
150 base::MakeUnique<views::SurfaceContextFactory>(gpu_service_.get()); 150 base::MakeUnique<views::SurfaceContextFactory>(gpu_service_.get());
151 aura::Env::GetInstance()->set_context_factory( 151 aura::Env::GetInstance()->set_context_factory(
152 compositor_context_factory_.get()); 152 compositor_context_factory_.get());
153 client_ = base::MakeUnique<ui::WindowTreeClient>(this, nullptr, nullptr); 153 client_ = base::MakeUnique<ui::WindowTreeClient>(this, nullptr, nullptr);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 std::copy(roots.begin(), roots.end(), std::back_inserter(windows)); 210 std::copy(roots.begin(), roots.end(), std::back_inserter(windows));
211 return GetWindowFrom(display_origins, windows, point); 211 return GetWindowFrom(display_origins, windows, point);
212 } 212 }
213 213
214 std::unique_ptr<OSExchangeData::Provider> 214 std::unique_ptr<OSExchangeData::Provider>
215 WindowManagerConnection::BuildProvider() { 215 WindowManagerConnection::BuildProvider() {
216 return base::MakeUnique<OSExchangeDataProviderMus>(); 216 return base::MakeUnique<OSExchangeDataProviderMus>();
217 } 217 }
218 218
219 } // namespace views 219 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | ui/views/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698