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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 334923002: Remove ContentBrowserClient::GuestWebContentsAttached (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_adview
Patch Set: Hopefully fixed tests Created 6 years, 6 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/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 6f590e9fc0280f3677b23b9873b8303d3609bfcd..b3bd05a6b214e08d5efe3022f6397a1e9712cdbd 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -226,11 +226,6 @@ void BrowserPluginGuest::Initialize(
// Inform the embedder of the guest's attachment.
SendMessageToEmbedder(new BrowserPluginMsg_Attach_ACK(instance_id_));
-
- if (delegate_) {
- delegate_->DidAttach(extra_params);
- has_render_view_ = true;
- }
}
BrowserPluginGuest::~BrowserPluginGuest() {
@@ -487,6 +482,9 @@ void BrowserPluginGuest::Attach(
if (attached())
return;
+ if (delegate_)
+ delegate_->WillAttach(embedder_web_contents, extra_params);
+
// If a RenderView has already been created for this new window, then we need
// to initialize the browser-side state now so that the RenderFrameHostManager
// does not create a new RenderView on navigation.
@@ -502,6 +500,9 @@ void BrowserPluginGuest::Attach(
SendQueuedMessages();
+ if (delegate_)
+ delegate_->DidAttach();
+
RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Attached"));
}
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.h ('k') | content/public/browser/browser_plugin_guest_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698