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

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

Issue 11693009: Browser Plugin: Implement ExecuteScript (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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_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)
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest_impl.h ('k') | content/browser/speech/input_tag_speech_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698