Index: content/browser/browser_plugin/browser_plugin_guest_impl.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_guest_impl.cc b/content/browser/browser_plugin/browser_plugin_guest_impl.cc |
index d983c75b46842b81a6c377a42e63020b24d0b276..7818f27ad552ee4932ad78ac73bc270112f0dc44 100644 |
--- a/content/browser/browser_plugin/browser_plugin_guest_impl.cc |
+++ b/content/browser/browser_plugin/browser_plugin_guest_impl.cc |
@@ -62,7 +62,6 @@ BrowserPluginGuestImpl::BrowserPluginGuestImpl( |
max_auto_size_(params.auto_size_params.max_size), |
min_auto_size_(params.auto_size_params.min_size) { |
DCHECK(web_contents); |
- GetContentClient()->browser()->BrowserPluginGuestCreated(this); |
} |
void BrowserPluginGuestImpl::AddObserver(BrowserPluginGuestObserver* observer) { |
@@ -115,9 +114,13 @@ void BrowserPluginGuestImpl::Initialize( |
content::Source<content::WebContents>(web_contents())); |
OnSetSize(instance_id_, params.auto_size_params, params.resize_guest_params); |
+ GetContentClient()->browser()->BrowserPluginGuestCreated(this); |
} |
BrowserPluginGuestImpl::~BrowserPluginGuestImpl() { |
+ FOR_EACH_OBSERVER(BrowserPluginGuestObserver, observers_, |
+ BrowserPluginGuestGone()); |
+ FOR_EACH_OBSERVER(BrowserPluginGuestObserver, observers_, OnDestruct()); |
} |
// static |
@@ -156,6 +159,14 @@ void BrowserPluginGuestImpl::RequestMessageFromEmbedder(uint32 message_id) { |
RequestMessage(message_id); |
} |
+WebContents* BrowserPluginGuestImpl::GetWebContents() const { |
+ return web_contents(); |
+} |
+ |
+WebContents* BrowserPluginGuestImpl::GetEmbedderWebContents() const { |
+ return embedder_web_contents_; |
+} |
+ |
void BrowserPluginGuestImpl::Observe(int type, |
const NotificationSource& source, |
const NotificationDetails& details) { |
@@ -226,10 +237,6 @@ bool BrowserPluginGuestImpl::ShouldFocusPageAfterCrash() { |
return false; |
} |
-WebContents* BrowserPluginGuestImpl::GetWebContents() { |
- return web_contents(); |
-} |
- |
base::SharedMemory* BrowserPluginGuestImpl::GetDamageBufferFromEmbedder( |
const BrowserPluginHostMsg_ResizeGuest_Params& params) { |
#if defined(OS_WIN) |