Index: content/browser/frame_host/render_widget_host_view_guest.cc |
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc |
index 6d4a1811c5bc9eae2ed516d37e990a25d42bc905..0e01c8e99ffb3e3df60db8f07ff7e53bce22e6b5 100644 |
--- a/content/browser/frame_host/render_widget_host_view_guest.cc |
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc |
@@ -134,7 +134,7 @@ void RenderWidgetHostViewGuest::Focus() { |
// InterstitialPages are not WebContents, and so BrowserPluginGuest does not |
// have direct access to the interstitial page's RenderWidgetHost. |
if (guest_) |
- guest_->SetFocus(host_, true, blink::WebFocusTypeNone); |
+ guest_->SetFocusForRenderWidgetHost(host_, true, blink::WebFocusTypeNone); |
} |
bool RenderWidgetHostViewGuest::HasFocus() const { |
@@ -218,7 +218,11 @@ void RenderWidgetHostViewGuest::Destroy() { |
} |
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const { |
- return RenderWidgetHostViewBase::GetPhysicalBackingSize(); |
+ blink::WebScreenInfo screen_info; |
+ RenderWidgetHostViewBase* embedder_view = GetOwnerRenderWidgetHostView(); |
+ if (embedder_view) |
+ embedder_view->GetScreenInfo(&screen_info); |
+ return gfx::ScaleToCeiledSize(size_, screen_info.deviceScaleFactor); |
} |
base::string16 RenderWidgetHostViewGuest::GetSelectedText() const { |
@@ -254,7 +258,6 @@ void RenderWidgetHostViewGuest::OnSwapCompositorFrame( |
gfx::Size frame_size = root_pass->output_rect.size(); |
float scale_factor = frame->metadata.device_scale_factor; |
- |
// Check whether we need to recreate the cc::Surface, which means the child |
// frame renderer has changed its output surface, or size, or scale factor. |
if (output_surface_id != last_output_surface_id_ && surface_factory_) { |