OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/render_widget_host_view.h" | 5 #include "content/browser/renderer_host/render_widget_host_view.h" |
6 | 6 |
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
| 8 |
| 9 #if defined(OS_MACOSX) |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFact
ory.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFact
ory.h" |
| 11 #endif |
| 12 |
| 13 #if defined(TOUCH_UI) |
| 14 #include <gdk/gdkx.h> |
| 15 #include <gtk/gtk.h> |
| 16 |
| 17 #include "content/browser/renderer_host/gtk_window_utils.h" |
| 18 #endif |
9 | 19 |
10 // TODO(jam): move this to render_widget_host_view_mac.mm when it moves to | 20 // TODO(jam): move this to render_widget_host_view_mac.mm when it moves to |
11 // content. | 21 // content. |
12 #if defined(OS_MACOSX) | 22 #if defined(OS_MACOSX) |
13 // static | 23 // static |
14 void RenderWidgetHostView::GetDefaultScreenInfo( | 24 void RenderWidgetHostView::GetDefaultScreenInfo( |
15 WebKit::WebScreenInfo* results) { | 25 WebKit::WebScreenInfo* results) { |
16 *results = WebKit::WebScreenInfoFactory::screenInfo(NULL); | 26 *results = WebKit::WebScreenInfoFactory::screenInfo(NULL); |
17 } | 27 } |
18 #endif | 28 #endif |
19 | 29 |
| 30 // TODO(erg): move this to render_widget_host_view_views_gtk.cc when if it |
| 31 // moves to content. |
| 32 #if defined(TOUCH_UI) |
| 33 // static |
| 34 void RenderWidgetHostView::GetDefaultScreenInfo( |
| 35 WebKit::WebScreenInfo* results) { |
| 36 GdkWindow* gdk_window = |
| 37 gdk_display_get_default_group(gdk_display_get_default()); |
| 38 content::GetScreenInfoFromNativeWindow(gdk_window, results); |
| 39 } |
| 40 #endif |
| 41 |
20 RenderWidgetHostView::~RenderWidgetHostView() {} | 42 RenderWidgetHostView::~RenderWidgetHostView() {} |
21 | 43 |
22 void RenderWidgetHostView::SetBackground(const SkBitmap& background) { | 44 void RenderWidgetHostView::SetBackground(const SkBitmap& background) { |
23 background_ = background; | 45 background_ = background; |
24 } | 46 } |
OLD | NEW |