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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_screen_x11.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/views/widget/desktop_aura/desktop_screen_x11.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/widget/desktop_aura/desktop_screen_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_screen_x11.h"
6 6
7 #include <X11/extensions/Xrandr.h> 7 #include <X11/extensions/Xrandr.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 // It clashes with out RootWindow. 10 // It clashes with out RootWindow.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const gfx::Point& point) { 158 const gfx::Point& point) {
159 X11TopmostWindowFinder finder; 159 X11TopmostWindowFinder finder;
160 return finder.FindLocalProcessWindowAt( 160 return finder.FindLocalProcessWindowAt(
161 DIPToPixelPoint(point), std::set<aura::Window*>()); 161 DIPToPixelPoint(point), std::set<aura::Window*>());
162 } 162 }
163 163
164 int DesktopScreenX11::GetNumDisplays() const { 164 int DesktopScreenX11::GetNumDisplays() const {
165 return displays_.size(); 165 return displays_.size();
166 } 166 }
167 167
168 std::vector<display::Display> DesktopScreenX11::GetAllDisplays() const { 168 const std::vector<display::Display>& DesktopScreenX11::GetAllDisplays() const {
169 return displays_; 169 return displays_;
170 } 170 }
171 171
172 display::Display DesktopScreenX11::GetDisplayNearestWindow( 172 display::Display DesktopScreenX11::GetDisplayNearestWindow(
173 gfx::NativeView window) const { 173 gfx::NativeView window) const {
174 if (!window) 174 if (!window)
175 return GetPrimaryDisplay(); 175 return GetPrimaryDisplay();
176 176
177 // Getting screen bounds here safely is hard. 177 // Getting screen bounds here safely is hard.
178 // 178 //
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 GetPrimaryDisplay().device_scale_factor()); 403 GetPrimaryDisplay().device_scale_factor());
404 } 404 }
405 405
406 //////////////////////////////////////////////////////////////////////////////// 406 ////////////////////////////////////////////////////////////////////////////////
407 407
408 display::Screen* CreateDesktopScreen() { 408 display::Screen* CreateDesktopScreen() {
409 return new DesktopScreenX11; 409 return new DesktopScreenX11;
410 } 410 }
411 411
412 } // namespace views 412 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698