Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1516)

Unified Diff: content/browser/renderer_host/render_view_host.cc

Issue 9302022: WebWidgetClient::screenInfo() no longer does a synchronous IPC. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed broken Windows build on last iteration. Thank you commit queue/trybots :) Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host.cc
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index e193dc2e71f586ccbb9a6cb3ec494e4606e7833a..889c31684e612ad1431d2aa5adb0fcf542ee622e 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -53,6 +53,9 @@
#include "net/base/net_util.h"
#include "net/url_request/url_request_context_getter.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#if defined(OS_WIN)
+#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h"
+#endif
#include "ui/gfx/native_widget_types.h"
#include "webkit/fileapi/isolated_context.h"
#include "webkit/glue/webaccessibility.h"
@@ -211,6 +214,20 @@ bool RenderViewHost::CreateRenderView(const string16& frame_name,
params.session_storage_namespace_id = session_storage_namespace_->id();
params.frame_name = frame_name;
params.next_page_id = next_page_id;
+#if defined(OS_POSIX) || defined(USE_AURA)
+ if (view()) {
+ static_cast<content::RenderWidgetHostViewPort*>(
+ view())->GetScreenInfo(&params.screen_info);
+ } else {
+ content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
+ &params.screen_info);
+ }
+#else
+ params.screen_info =
+ WebKit::WebScreenInfoFactory::screenInfo(
+ gfx::NativeViewFromId(GetNativeViewId()));
+#endif
+
Send(new ViewMsg_New(params));
// If it's enabled, tell the renderer to set up the Javascript bindings for
« no previous file with comments | « content/browser/renderer_host/render_message_filter_win.cc ('k') | content/browser/renderer_host/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698