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

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: Refreshed patch to merge with tip of tree 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
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | content/renderer/render_widget.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e86d7fb063a6a243ada87467f7ecade746f440c1..2e124bdffb1679212b486fa57f9f6fe645c8a34e 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"
@@ -206,6 +209,19 @@ 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())
jam 2012/02/29 23:41:17 brace brackets here and below per style guide
Fady Samuel 2012/03/01 00:52:25 Done.
Fady Samuel 2012/03/01 00:52:25 Done.
+ 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 | « no previous file | content/common/view_messages.h » ('j') | content/renderer/render_widget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698