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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_screen_x11.cc

Issue 263643004: Teach gfx::Screen about color profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mojo movers [sky]. Created 6 years, 7 months 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 | Annotate | Revision Log
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (host) { 216 if (host) {
217 DesktopWindowTreeHostX11* rwh = DesktopWindowTreeHostX11::GetHostForXID( 217 DesktopWindowTreeHostX11* rwh = DesktopWindowTreeHostX11::GetHostForXID(
218 host->GetAcceleratedWidget()); 218 host->GetAcceleratedWidget());
219 if (rwh) 219 if (rwh)
220 return GetDisplayMatching(rwh->GetX11RootWindowBounds()); 220 return GetDisplayMatching(rwh->GetX11RootWindowBounds());
221 } 221 }
222 222
223 return GetPrimaryDisplay(); 223 return GetPrimaryDisplay();
224 } 224 }
225 225
226 bool DesktopScreenX11::GetDisplayColorProfile(
227 gfx::NativeView view, std::vector<char>* color_profile) const {
228 // TODO(port): consider screen color profile support.
229 return false;
230 }
231
226 gfx::Display DesktopScreenX11::GetDisplayNearestPoint( 232 gfx::Display DesktopScreenX11::GetDisplayNearestPoint(
227 const gfx::Point& point) const { 233 const gfx::Point& point) const {
228 for (std::vector<gfx::Display>::const_iterator it = displays_.begin(); 234 for (std::vector<gfx::Display>::const_iterator it = displays_.begin();
229 it != displays_.end(); ++it) { 235 it != displays_.end(); ++it) {
230 if (it->bounds().Contains(point)) 236 if (it->bounds().Contains(point))
231 return *it; 237 return *it;
232 } 238 }
233 239
234 return GetPrimaryDisplay(); 240 return GetPrimaryDisplay();
235 } 241 }
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 ProcessDisplayChange(new_displays); 394 ProcessDisplayChange(new_displays);
389 } 395 }
390 396
391 //////////////////////////////////////////////////////////////////////////////// 397 ////////////////////////////////////////////////////////////////////////////////
392 398
393 gfx::Screen* CreateDesktopScreen() { 399 gfx::Screen* CreateDesktopScreen() {
394 return new DesktopScreenX11; 400 return new DesktopScreenX11;
395 } 401 }
396 402
397 } // namespace views 403 } // namespace views
OLDNEW
« ui/gfx/screen.h ('K') | « 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