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

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

Issue 2489873002: Change GetAllDisplays() in all screens to return a const vector&. (Closed)
Patch Set: roll back to rebase as dummy_screen_android is reverted Created 4 years, 1 month 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/display/win/screen_win.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_x11.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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ui/display/win/screen_win.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698