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.h" | 5 #include "ui/views/widget/desktop_aura/desktop_screen.h" |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 | 8 |
9 // It clashes with out RootWindow. | 9 // It clashes with out RootWindow. |
10 #undef RootWindow | 10 #undef RootWindow |
(...skipping 29 matching lines...) Expand all Loading... |
40 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 40 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
41 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; | 41 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; |
42 virtual int GetNumDisplays() OVERRIDE; | 42 virtual int GetNumDisplays() OVERRIDE; |
43 virtual gfx::Display GetDisplayNearestWindow( | 43 virtual gfx::Display GetDisplayNearestWindow( |
44 gfx::NativeView window) const OVERRIDE; | 44 gfx::NativeView window) const OVERRIDE; |
45 virtual gfx::Display GetDisplayNearestPoint( | 45 virtual gfx::Display GetDisplayNearestPoint( |
46 const gfx::Point& point) const OVERRIDE; | 46 const gfx::Point& point) const OVERRIDE; |
47 virtual gfx::Display GetDisplayMatching( | 47 virtual gfx::Display GetDisplayMatching( |
48 const gfx::Rect& match_rect) const OVERRIDE; | 48 const gfx::Rect& match_rect) const OVERRIDE; |
49 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; | 49 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; |
| 50 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE; |
| 51 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE; |
50 | 52 |
51 private: | 53 private: |
52 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); | 54 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); |
53 }; | 55 }; |
54 | 56 |
55 //////////////////////////////////////////////////////////////////////////////// | 57 //////////////////////////////////////////////////////////////////////////////// |
56 // DesktopScreenX11, public: | 58 // DesktopScreenX11, public: |
57 | 59 |
58 DesktopScreenX11::DesktopScreenX11() { | 60 DesktopScreenX11::DesktopScreenX11() { |
59 } | 61 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const gfx::Rect& match_rect) const { | 117 const gfx::Rect& match_rect) const { |
116 // TODO(erg): Do the right thing once we know what that is. | 118 // TODO(erg): Do the right thing once we know what that is. |
117 return gfx::Display(0, gfx::Rect(GetPrimaryDisplaySize())); | 119 return gfx::Display(0, gfx::Rect(GetPrimaryDisplaySize())); |
118 } | 120 } |
119 | 121 |
120 gfx::Display DesktopScreenX11::GetPrimaryDisplay() const { | 122 gfx::Display DesktopScreenX11::GetPrimaryDisplay() const { |
121 // TODO(erg): Do the right thing once we know what that is. | 123 // TODO(erg): Do the right thing once we know what that is. |
122 return gfx::Display(0, gfx::Rect(GetPrimaryDisplaySize())); | 124 return gfx::Display(0, gfx::Rect(GetPrimaryDisplaySize())); |
123 } | 125 } |
124 | 126 |
| 127 void DesktopScreenX11::AddObserver(gfx::DisplayObserver* observer) { |
| 128 // TODO(erg|oshima): Do the right thing once we know what that is. |
| 129 // crbug.com/122863 |
| 130 } |
| 131 void DesktopScreenX11::RemoveObserver(gfx::DisplayObserver* observer) { |
| 132 // TODO(erg|oshima): Do the right thing once we know what that is. |
| 133 // crbug.com/122863 |
| 134 } |
| 135 |
125 } // namespace | 136 } // namespace |
126 | 137 |
127 //////////////////////////////////////////////////////////////////////////////// | 138 //////////////////////////////////////////////////////////////////////////////// |
128 | 139 |
129 namespace views { | 140 namespace views { |
130 | 141 |
131 gfx::Screen* CreateDesktopScreen() { | 142 gfx::Screen* CreateDesktopScreen() { |
132 return new DesktopScreenX11; | 143 return new DesktopScreenX11; |
133 } | 144 } |
134 | 145 |
135 } // namespace views | 146 } // namespace views |
OLD | NEW |