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 <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind( | 178 ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind( |
179 &WindowManagerConnection::CreateNativeWidgetMus, | 179 &WindowManagerConnection::CreateNativeWidgetMus, |
180 base::Unretained(this), | 180 base::Unretained(this), |
181 std::map<std::string, std::vector<uint8_t>>())); | 181 std::map<std::string, std::vector<uint8_t>>())); |
182 } | 182 } |
183 | 183 |
184 ui::Window* WindowManagerConnection::GetUiWindowAtScreenPoint( | 184 ui::Window* WindowManagerConnection::GetUiWindowAtScreenPoint( |
185 const gfx::Point& point) { | 185 const gfx::Point& point) { |
186 std::map<int64_t, gfx::Point> display_origins; | 186 std::map<int64_t, gfx::Point> display_origins; |
187 for (display::Display& d : display::Screen::GetScreen()->GetAllDisplays()) | 187 for (const display::Display& d : |
| 188 display::Screen::GetScreen()->GetAllDisplays()) |
188 display_origins[d.id()] = d.bounds().origin(); | 189 display_origins[d.id()] = d.bounds().origin(); |
189 | 190 |
190 const std::set<ui::Window*>& roots = GetRoots(); | 191 const std::set<ui::Window*>& roots = GetRoots(); |
191 std::vector<ui::Window*> windows; | 192 std::vector<ui::Window*> windows; |
192 std::copy(roots.begin(), roots.end(), std::back_inserter(windows)); | 193 std::copy(roots.begin(), roots.end(), std::back_inserter(windows)); |
193 return GetWindowFrom(display_origins, windows, point); | 194 return GetWindowFrom(display_origins, windows, point); |
194 } | 195 } |
195 | 196 |
196 void WindowManagerConnection::OnEmbed(ui::Window* root) {} | 197 void WindowManagerConnection::OnEmbed(ui::Window* root) {} |
197 | 198 |
(...skipping 27 matching lines...) Expand all Loading... |
225 const gfx::Point& point) { | 226 const gfx::Point& point) { |
226 return GetAuraWindowFromUiWindow(GetUiWindowAtScreenPoint(point)); | 227 return GetAuraWindowFromUiWindow(GetUiWindowAtScreenPoint(point)); |
227 } | 228 } |
228 | 229 |
229 std::unique_ptr<OSExchangeData::Provider> | 230 std::unique_ptr<OSExchangeData::Provider> |
230 WindowManagerConnection::BuildProvider() { | 231 WindowManagerConnection::BuildProvider() { |
231 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); | 232 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); |
232 } | 233 } |
233 | 234 |
234 } // namespace views | 235 } // namespace views |
OLD | NEW |