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

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

Issue 1560553002: Framelet Prototype 2016 Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + Applied Brett's Windows + Fixed security issue 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..9cfa1da40c79598635b30373a61b38eb7e9d0fe0 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -23,10 +23,10 @@
#include "content/common/browser_plugin/browser_plugin_messages.h"
#include "content/common/frame_messages.h"
#include "content/common/gpu/gpu_messages.h"
-#include "content/common/input/web_touch_event_traits.h"
#include "content/common/view_messages.h"
#include "content/common/webplugin_geometry.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/input/web_touch_event_traits.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
@@ -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/browser/renderer_host/event_with_latency_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698