| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | |
| 2 // source code is governed by a BSD-style license that can be found in the | |
| 3 // LICENSE file. | |
| 4 | |
| 5 #include "webkit/glue/webkit_glue.h" | |
| 6 | |
| 7 #include <gtk/gtk.h> | |
| 8 | |
| 9 #include "webkit/glue/screen_info.h" | |
| 10 | |
| 11 namespace webkit_glue { | |
| 12 | |
| 13 ScreenInfo GetScreenInfoHelper(gfx::NativeView window) { | |
| 14 ScreenInfo results; | |
| 15 results.depth = 32; | |
| 16 results.depth_per_component = 8; | |
| 17 results.is_monochrome = false; | |
| 18 | |
| 19 if (!window) | |
| 20 return results; | |
| 21 | |
| 22 GdkScreen* screen = gtk_widget_get_screen(GTK_WIDGET(window)); | |
| 23 results.rect.SetRect(0, 0, gdk_screen_get_width(screen), | |
| 24 gdk_screen_get_height(screen)); | |
| 25 // I don't know of a way to query the "maximise" size of the window (e.g. | |
| 26 // screen size less sidebars etc) since this is something which only the | |
| 27 // window manager knows. | |
| 28 results.available_rect = results.rect; | |
| 29 | |
| 30 return results; | |
| 31 } | |
| 32 | |
| 33 } // namespace webkit_glue | |
| OLD | NEW |