| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/display/chromeos/x11/native_display_delegate_x11.h" | 5 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" |
| 6 | 6 |
| 7 #include <X11/Xatom.h> | 7 #include <X11/Xatom.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 #include <X11/extensions/dpms.h> | 9 #include <X11/extensions/dpms.h> |
| 10 #include <X11/extensions/Xrandr.h> | 10 #include <X11/extensions/Xrandr.h> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // NativeDisplayDelegateX11::HelperDelegateX11 | 76 // NativeDisplayDelegateX11::HelperDelegateX11 |
| 77 | 77 |
| 78 class NativeDisplayDelegateX11::HelperDelegateX11 | 78 class NativeDisplayDelegateX11::HelperDelegateX11 |
| 79 : public NativeDisplayDelegateX11::HelperDelegate { | 79 : public NativeDisplayDelegateX11::HelperDelegate { |
| 80 public: | 80 public: |
| 81 HelperDelegateX11(NativeDisplayDelegateX11* delegate) : delegate_(delegate) {} | 81 HelperDelegateX11(NativeDisplayDelegateX11* delegate) : delegate_(delegate) {} |
| 82 virtual ~HelperDelegateX11() {} | 82 virtual ~HelperDelegateX11() {} |
| 83 | 83 |
| 84 // NativeDisplayDelegateX11::HelperDelegate overrides: | 84 // NativeDisplayDelegateX11::HelperDelegate overrides: |
| 85 virtual void UpdateXRandRConfiguration(const base::NativeEvent& event) | 85 virtual void UpdateXRandRConfiguration(const base::NativeEvent& event) |
| 86 OVERRIDE { | 86 override { |
| 87 XRRUpdateConfiguration(event); | 87 XRRUpdateConfiguration(event); |
| 88 } | 88 } |
| 89 virtual const std::vector<DisplaySnapshot*>& GetCachedDisplays() const | 89 virtual const std::vector<DisplaySnapshot*>& GetCachedDisplays() const |
| 90 OVERRIDE { | 90 override { |
| 91 return delegate_->cached_outputs_.get(); | 91 return delegate_->cached_outputs_.get(); |
| 92 } | 92 } |
| 93 virtual void NotifyDisplayObservers() OVERRIDE { | 93 virtual void NotifyDisplayObservers() override { |
| 94 FOR_EACH_OBSERVER( | 94 FOR_EACH_OBSERVER( |
| 95 NativeDisplayObserver, delegate_->observers_, OnConfigurationChanged()); | 95 NativeDisplayObserver, delegate_->observers_, OnConfigurationChanged()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 NativeDisplayDelegateX11* delegate_; | 99 NativeDisplayDelegateX11* delegate_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(HelperDelegateX11); | 101 DISALLOW_COPY_AND_ASSIGN(HelperDelegateX11); |
| 102 }; | 102 }; |
| 103 | 103 |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 XSetForeground(display_, gc, color.pixel); | 642 XSetForeground(display_, gc, color.pixel); |
| 643 XSetFillStyle(display_, gc, FillSolid); | 643 XSetFillStyle(display_, gc, FillSolid); |
| 644 int width = DisplayWidth(display_, DefaultScreen(display_)); | 644 int width = DisplayWidth(display_, DefaultScreen(display_)); |
| 645 int height = DisplayHeight(display_, DefaultScreen(display_)); | 645 int height = DisplayHeight(display_, DefaultScreen(display_)); |
| 646 XFillRectangle(display_, window_, gc, 0, 0, width, height); | 646 XFillRectangle(display_, window_, gc, 0, 0, width, height); |
| 647 XFreeGC(display_, gc); | 647 XFreeGC(display_, gc); |
| 648 XFreeColors(display_, colormap, &color.pixel, 1, 0); | 648 XFreeColors(display_, colormap, &color.pixel, 1, 0); |
| 649 } | 649 } |
| 650 | 650 |
| 651 } // namespace ui | 651 } // namespace ui |
| OLD | NEW |