OLD | NEW |
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 if (host) { | 263 if (host) { |
264 DesktopWindowTreeHostX11* rwh = DesktopWindowTreeHostX11::GetHostForXID( | 264 DesktopWindowTreeHostX11* rwh = DesktopWindowTreeHostX11::GetHostForXID( |
265 host->GetAcceleratedWidget()); | 265 host->GetAcceleratedWidget()); |
266 if (rwh) | 266 if (rwh) |
267 return GetDisplayMatching(rwh->GetX11RootWindowBounds()); | 267 return GetDisplayMatching(rwh->GetX11RootWindowBounds()); |
268 } | 268 } |
269 | 269 |
270 return GetPrimaryDisplay(); | 270 return GetPrimaryDisplay(); |
271 } | 271 } |
272 | 272 |
| 273 bool DesktopScreenX11::GetDisplayColorProfile( |
| 274 gfx::NativeView view, std::vector<char>* color_profile) const { |
| 275 // TODO(port): consider screen color profile support. |
| 276 return false; |
| 277 } |
| 278 |
273 gfx::Display DesktopScreenX11::GetDisplayNearestPoint( | 279 gfx::Display DesktopScreenX11::GetDisplayNearestPoint( |
274 const gfx::Point& point) const { | 280 const gfx::Point& point) const { |
275 for (std::vector<gfx::Display>::const_iterator it = displays_.begin(); | 281 for (std::vector<gfx::Display>::const_iterator it = displays_.begin(); |
276 it != displays_.end(); ++it) { | 282 it != displays_.end(); ++it) { |
277 if (it->bounds().Contains(point)) | 283 if (it->bounds().Contains(point)) |
278 return *it; | 284 return *it; |
279 } | 285 } |
280 | 286 |
281 return GetPrimaryDisplay(); | 287 return GetPrimaryDisplay(); |
282 } | 288 } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 ProcessDisplayChange(new_displays); | 441 ProcessDisplayChange(new_displays); |
436 } | 442 } |
437 | 443 |
438 //////////////////////////////////////////////////////////////////////////////// | 444 //////////////////////////////////////////////////////////////////////////////// |
439 | 445 |
440 gfx::Screen* CreateDesktopScreen() { | 446 gfx::Screen* CreateDesktopScreen() { |
441 return new DesktopScreenX11; | 447 return new DesktopScreenX11; |
442 } | 448 } |
443 | 449 |
444 } // namespace views | 450 } // namespace views |
OLD | NEW |