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 "content/browser/renderer_host/gtk_window_utils.h" | 5 #include "content/browser/renderer_host/gtk_window_utils.h" |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "third_party/WebKit/public/web/WebScreenInfo.h" | 13 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
14 #include "ui/base/x/x11_util.h" | 14 #include "ui/base/x/x11_util.h" |
15 #include "ui/gfx/gtk_compat.h" | 15 #include "ui/gfx/gtk_compat.h" |
16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
17 #include "ui/gfx/x/x11_types.h" | 17 #include "ui/gfx/x/x11_types.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Returns the region of |window|'s desktop that isn't occupied by docks or | 23 // Returns the region of |window|'s desktop that isn't occupied by docks or |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 monitor_rect.width, monitor_rect.height); | 80 monitor_rect.width, monitor_rect.height); |
81 | 81 |
82 gfx::Rect available_rect = results->rect; | 82 gfx::Rect available_rect = results->rect; |
83 gfx::Rect work_area = GetWorkArea(GDK_WINDOW_XID(gdk_window)); | 83 gfx::Rect work_area = GetWorkArea(GDK_WINDOW_XID(gdk_window)); |
84 if (!work_area.IsEmpty()) | 84 if (!work_area.IsEmpty()) |
85 available_rect.Intersect(work_area); | 85 available_rect.Intersect(work_area); |
86 results->availableRect = available_rect; | 86 results->availableRect = available_rect; |
87 } | 87 } |
88 | 88 |
89 } // namespace content | 89 } // namespace content |
OLD | NEW |