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

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

Issue 549323002: BrowserPlugin: Interstitial Pages work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 b8b99046005a32b91503c8dd4e14ffbce2d654c0..aa0bec774c4b19a5cf81142bf8dfad56b0fe2787 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -84,6 +84,8 @@ void RenderWidgetHostViewGuest::WasShown() {
// |guest_| is NULL during test.
if ((guest_ && guest_->is_in_destruction()) || !host_->is_hidden())
return;
+ // Make sure the size of this view matches the size of the WebContentsView.
+ SetSize(guest_->web_contents()->GetViewBounds().size());
host_->WasShown(ui::LatencyInfo());
}
@@ -103,6 +105,17 @@ void RenderWidgetHostViewGuest::SetBounds(const gfx::Rect& rect) {
SetSize(rect.size());
}
+void RenderWidgetHostViewGuest::Focus() {
+ if (guest_)
lazyboy 2014/09/09 07:04:45 Can you explain a bit why this change and HasFocus
Fady Samuel 2014/09/09 17:14:49 Done. InterstitialPage calls Focus directly: https
+ guest_->SetFocus(host_, true);
+}
+
+bool RenderWidgetHostViewGuest::HasFocus() const {
+ if (!guest_)
+ return false;
+ return guest_->focused();
+}
+
#if defined(USE_AURA)
void RenderWidgetHostViewGuest::ProcessAckedTouchEvent(
const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) {
@@ -264,7 +277,12 @@ void RenderWidgetHostViewGuest::MovePluginWindows(
}
void RenderWidgetHostViewGuest::UpdateCursor(const WebCursor& cursor) {
- platform_view_->UpdateCursor(cursor);
+ if (!guest_)
+ return;
+ guest_->SendMessageToEmbedder(
lazyboy 2014/09/09 07:04:45 Same for this one, probably add a comment right he
Fady Samuel 2014/09/09 17:14:49 Done.
+ new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(),
+ cursor));
+
}
void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) {

Powered by Google App Engine
This is Rietveld 408576698