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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 years, 11 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/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_) {
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/public/browser/browser_plugin_guest_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698