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

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

Issue 640293005: Revert of 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 d00906179f87837f5566a2016be9e99733f7c813..b881309d16b034d0f9b3e0d86a0f3cba089fbcb7 100644
--- a/extensions/browser/guest_view/guest_view_base.h
+++ b/extensions/browser/guest_view/guest_view_base.h
@@ -27,6 +27,7 @@
// 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:
@@ -170,9 +171,10 @@
const base::DictionaryValue& create_params,
const WebContentsCreatedCallback& callback);
- void InitWithWebContents(const std::string& embedder_extension_id,
- content::WebContents* embedder_web_contents,
- content::WebContents* guest_web_contents);
+ void InitWithWebContents(
+ const std::string& embedder_extension_id,
+ int embedder_render_process_id,
+ content::WebContents* guest_web_contents);
bool IsViewType(const char* const view_type) const {
return !strcmp(GetViewType(), view_type);
@@ -226,6 +228,12 @@
// Saves the attach state of the custom element hosting this GuestView.
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;
@@ -249,12 +257,12 @@
virtual ~GuestViewBase();
private:
- class EmbedderLifetimeObserver;
+ class EmbedderWebContentsObserver;
void SendQueuedEvents();
void CompleteInit(const std::string& embedder_extension_id,
- content::WebContents* embedder_web_contents,
+ int embedder_render_process_id,
const WebContentsCreatedCallback& callback,
content::WebContents* guest_web_contents);
@@ -312,7 +320,7 @@
// guests that are created from this guest.
scoped_ptr<base::DictionaryValue> attach_params_;
- scoped_ptr<EmbedderLifetimeObserver> embedder_web_contents_observer_;
+ scoped_ptr<EmbedderWebContentsObserver> 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