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

Unified Diff: extensions/browser/guest_view/guest_view_base.h

Issue 642573002: Remove the RenderProcessHost observer and attach the WebContentsObserver earlier to the GuestView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tests_other0
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | extensions/browser/guest_view/guest_view_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/guest_view/guest_view_base.h
diff --git a/extensions/browser/guest_view/guest_view_base.h b/extensions/browser/guest_view/guest_view_base.h
index b881309d16b034d0f9b3e0d86a0f3cba089fbcb7..d00906179f87837f5566a2016be9e99733f7c813 100644
--- a/extensions/browser/guest_view/guest_view_base.h
+++ b/extensions/browser/guest_view/guest_view_base.h
@@ -27,7 +27,6 @@ namespace extensions {
// WebContents. At that point, its lifetime is restricted in scope to the
// lifetime of its embedder WebContents.
class GuestViewBase : public content::BrowserPluginGuestDelegate,
- public content::RenderProcessHostObserver,
public content::WebContentsDelegate,
public content::WebContentsObserver {
public:
@@ -171,10 +170,9 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
const base::DictionaryValue& create_params,
const WebContentsCreatedCallback& callback);
- void InitWithWebContents(
- const std::string& embedder_extension_id,
- int embedder_render_process_id,
- content::WebContents* guest_web_contents);
+ void InitWithWebContents(const std::string& embedder_extension_id,
+ content::WebContents* embedder_web_contents,
+ content::WebContents* guest_web_contents);
bool IsViewType(const char* const view_type) const {
return !strcmp(GetViewType(), view_type);
@@ -229,12 +227,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
void SetAttachParams(const base::DictionaryValue& params);
void SetOpener(GuestViewBase* opener);
- // RenderProcessHostObserver implementation
- virtual void RenderProcessExited(content::RenderProcessHost* host,
- base::ProcessHandle handle,
- base::TerminationStatus status,
- int exit_code) override;
-
// BrowserPluginGuestDelegate implementation.
virtual void DidAttach(int guest_proxy_routing_id) override final;
virtual void ElementSizeChanged(const gfx::Size& old_size,
@@ -257,12 +249,12 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
virtual ~GuestViewBase();
private:
- class EmbedderWebContentsObserver;
+ class EmbedderLifetimeObserver;
void SendQueuedEvents();
void CompleteInit(const std::string& embedder_extension_id,
- int embedder_render_process_id,
+ content::WebContents* embedder_web_contents,
const WebContentsCreatedCallback& callback,
content::WebContents* guest_web_contents);
@@ -320,7 +312,7 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
// guests that are created from this guest.
scoped_ptr<base::DictionaryValue> attach_params_;
- scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_;
+ scoped_ptr<EmbedderLifetimeObserver> embedder_web_contents_observer_;
// The size of the container element.
gfx::Size element_size_;
« no previous file with comments | « no previous file | extensions/browser/guest_view/guest_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698