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