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/gfx/screen.h" | 5 #include "ui/gfx/screen.h" |
6 | 6 |
7 #include <gdk/gdkx.h> | 7 #include <gdk/gdkx.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 gfx::Rect rect; | 158 gfx::Rect rect; |
159 if (GetScreenWorkArea(&rect)) { | 159 if (GetScreenWorkArea(&rect)) { |
160 display.set_work_area(gfx::IntersectRects(rect, bounds)); | 160 display.set_work_area(gfx::IntersectRects(rect, bounds)); |
161 } else { | 161 } else { |
162 // Return the best we've got. | 162 // Return the best we've got. |
163 display.set_work_area(bounds); | 163 display.set_work_area(bounds); |
164 } | 164 } |
165 return display; | 165 return display; |
166 } | 166 } |
167 | 167 |
| 168 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE { |
| 169 // TODO(oshima): crbug.com/122863. |
| 170 } |
| 171 |
| 172 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE { |
| 173 // TODO(oshima): crbug.com/122863. |
| 174 } |
| 175 |
168 private: | 176 private: |
169 DISALLOW_COPY_AND_ASSIGN(ScreenGtk); | 177 DISALLOW_COPY_AND_ASSIGN(ScreenGtk); |
170 }; | 178 }; |
171 | 179 |
172 } // namespace | 180 } // namespace |
173 | 181 |
174 namespace gfx { | 182 namespace gfx { |
175 | 183 |
176 Screen* CreateNativeScreen() { | 184 Screen* CreateNativeScreen() { |
177 return new ScreenGtk; | 185 return new ScreenGtk; |
178 } | 186 } |
179 | 187 |
180 } // namespace gfx | 188 } // namespace gfx |
OLD | NEW |