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 "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "services/service_manager/public/cpp/connection.h" | 10 #include "services/service_manager/public/cpp/connection.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 return server_test_ptr_.get(); | 256 return server_test_ptr_.get(); |
257 } | 257 } |
258 | 258 |
259 std::unique_ptr<DesktopWindowTreeHost> MusClient::CreateDesktopWindowTreeHost( | 259 std::unique_ptr<DesktopWindowTreeHost> MusClient::CreateDesktopWindowTreeHost( |
260 const Widget::InitParams& init_params, | 260 const Widget::InitParams& init_params, |
261 internal::NativeWidgetDelegate* delegate, | 261 internal::NativeWidgetDelegate* delegate, |
262 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 262 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
263 std::map<std::string, std::vector<uint8_t>> mus_properties = | 263 std::map<std::string, std::vector<uint8_t>> mus_properties = |
264 ConfigurePropertiesFromParams(init_params); | 264 ConfigurePropertiesFromParams(init_params); |
265 return base::MakeUnique<DesktopWindowTreeHostMus>( | 265 return base::MakeUnique<DesktopWindowTreeHostMus>( |
266 delegate, desktop_native_widget_aura, &mus_properties); | 266 delegate, desktop_native_widget_aura, cc::FrameSinkId(), &mus_properties); |
267 } | 267 } |
268 | 268 |
269 void MusClient::OnEmbed( | 269 void MusClient::OnEmbed( |
270 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { | 270 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { |
271 NOTREACHED(); | 271 NOTREACHED(); |
272 } | 272 } |
273 | 273 |
274 void MusClient::OnLostConnection(aura::WindowTreeClient* client) {} | 274 void MusClient::OnLostConnection(aura::WindowTreeClient* client) {} |
275 | 275 |
276 void MusClient::OnEmbedRootDestroyed( | 276 void MusClient::OnEmbedRootDestroyed( |
(...skipping 24 matching lines...) Expand all Loading... |
301 // TODO: this likely gets z-order wrong. http://crbug.com/663606. | 301 // TODO: this likely gets z-order wrong. http://crbug.com/663606. |
302 gfx::Point relative_point(point); | 302 gfx::Point relative_point(point); |
303 window_tree_host->ConvertScreenInPixelsToDIP(&relative_point); | 303 window_tree_host->ConvertScreenInPixelsToDIP(&relative_point); |
304 if (gfx::Rect(root->bounds().size()).Contains(relative_point)) | 304 if (gfx::Rect(root->bounds().size()).Contains(relative_point)) |
305 return root->GetTopWindowContainingPoint(relative_point); | 305 return root->GetTopWindowContainingPoint(relative_point); |
306 } | 306 } |
307 return nullptr; | 307 return nullptr; |
308 } | 308 } |
309 | 309 |
310 } // namespace views | 310 } // namespace views |
OLD | NEW |