| Index: components/guest_view/browser/guest_view_manager.h
|
| diff --git a/components/guest_view/browser/guest_view_manager.h b/components/guest_view/browser/guest_view_manager.h
|
| index 5364edefcb920e6047d70c503f42e75ed56552c0..20ccddbc1070fcf04ed28a03760ba1c372d83a95 100644
|
| --- a/components/guest_view/browser/guest_view_manager.h
|
| +++ b/components/guest_view/browser/guest_view_manager.h
|
| @@ -132,6 +132,8 @@ class GuestViewManager : public content::BrowserPluginGuestManager,
|
| friend class GuestViewEvent;
|
| friend class GuestViewMessageFilter;
|
|
|
| + class EmbedderRenderProcessHostObserver;
|
| +
|
| // These methods are virtual so that they can be overriden in tests.
|
|
|
| virtual void AddGuest(int guest_instance_id,
|
| @@ -139,8 +141,8 @@ class GuestViewManager : public content::BrowserPluginGuestManager,
|
| virtual void RemoveGuest(int guest_instance_id);
|
|
|
| // This method is called when the embedder process with ID
|
| - // |embedder_process_id| is about to be destroyed.
|
| - virtual void EmbedderWillBeDestroyed(int embedder_process_id);
|
| + // |embedder_process_id| has been destroyed.
|
| + virtual void EmbedderProcessDestroyed(int embedder_process_id);
|
|
|
| // Called when a GuestView has been created in JavaScript.
|
| virtual void ViewCreated(int embedder_process_id,
|
| @@ -151,6 +153,15 @@ class GuestViewManager : public content::BrowserPluginGuestManager,
|
| virtual void ViewGarbageCollected(int embedder_process_id,
|
| int view_instance_id);
|
|
|
| + // Calls all destruction callbacks registered for the GuestView identified by
|
| + // |embedder_process_id| and |view_instance_id|.
|
| + void CallViewDestructionCallbacks(int embedder_process_id,
|
| + int view_instance_id);
|
| +
|
| + // Calls all destruction callbacks registered for GuestViews in the embedder
|
| + // with ID |embedder_process_id|.
|
| + void CallViewDestructionCallbacks(int embedder_process_id);
|
| +
|
| // Creates a guest of the provided |view_type|.
|
| GuestViewBase* CreateGuestInternal(content::WebContents* owner_web_contents,
|
| const std::string& view_type);
|
| @@ -215,7 +226,8 @@ class GuestViewManager : public content::BrowserPluginGuestManager,
|
|
|
| using GuestViewCreateFunction =
|
| base::Callback<GuestViewBase*(content::WebContents*)>;
|
| - using GuestViewCleanUpFunction = base::Callback<void(int, int)>;
|
| + using GuestViewCleanUpFunction =
|
| + base::Callback<void(content::BrowserContext*, int, int)>;
|
| struct GuestViewData {
|
| GuestViewData(const GuestViewCreateFunction& create_function,
|
| const GuestViewCleanUpFunction& cleanup_function);
|
|
|