summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_widget.cc
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 15:39:22 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 15:39:22 +0000
commitdfec1959de9bf1fff9a0b16d96cd64947f543d0f (patch)
tree34cc78751bbe0939be805abafef338d02d3a645e /content/renderer/render_widget.cc
parentcf4972a0ff960ea8ce5a90c9a5516d22dcf1525a (diff)
downloadchromium_src-dfec1959de9bf1fff9a0b16d96cd64947f543d0f.zip
chromium_src-dfec1959de9bf1fff9a0b16d96cd64947f543d0f.tar.gz
chromium_src-dfec1959de9bf1fff9a0b16d96cd64947f543d0f.tar.bz2
Revert 124453 - WebWidgetClient::screenInfo() no longer does a synchronous IPC.
Instead it grabs the necessary info from a cached WebScreenInfo factory. BUG=111401,126586 TEST=Manually Review URL: http://codereview.chromium.org/9302022 TBR=fsamuel@chromium.org,jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10441101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140030 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_widget.cc')
-rw-r--r--content/renderer/render_widget.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 14b716e..0fa18e0 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -72,7 +72,6 @@ using WebKit::WebWidget;
using content::RenderThread;
RenderWidget::RenderWidget(WebKit::WebPopupType popup_type,
- const WebKit::WebScreenInfo& screen_info,
bool swapped_out)
: routing_id_(MSG_ROUTING_NONE),
surface_id_(0),
@@ -104,7 +103,6 @@ RenderWidget::RenderWidget(WebKit::WebPopupType popup_type,
is_accelerated_compositing_active_(false),
animation_update_pending_(false),
invalidation_task_posted_(false),
- screen_info_(screen_info),
invert_(false) {
if (!swapped_out)
RenderProcess::current()->AddRefProcess();
@@ -127,11 +125,10 @@ RenderWidget::~RenderWidget() {
// static
RenderWidget* RenderWidget::Create(int32 opener_id,
- WebKit::WebPopupType popup_type,
- const WebKit::WebScreenInfo& screen_info) {
+ WebKit::WebPopupType popup_type) {
DCHECK(opener_id != MSG_ROUTING_NONE);
scoped_refptr<RenderWidget> widget(
- new RenderWidget(popup_type, screen_info, false));
+ new RenderWidget(popup_type, false));
widget->Init(opener_id); // adds reference
return widget;
}
@@ -1666,7 +1663,19 @@ bool RenderWidget::CanComposeInline() {
}
WebScreenInfo RenderWidget::screenInfo() {
- return screen_info_;
+ WebScreenInfo results;
+ if (host_window_set_)
+ Send(new ViewHostMsg_GetScreenInfo(routing_id_, host_window_, &results));
+ else {
+ DLOG(WARNING) << "Unable to retrieve screen information, no host window";
+#if defined(USE_AURA)
+ // TODO(backer): Remove this a temporary workaround for crbug.com/111929
+ // once we get a proper fix.
+ results.availableRect.width = 1000;
+ results.availableRect.height = 1000;
+#endif
+ }
+ return results;
}
void RenderWidget::resetInputMethod() {