Index: chrome/browser/guest_view/guest_view_base.h |
diff --git a/chrome/browser/guest_view/guest_view_base.h b/chrome/browser/guest_view/guest_view_base.h |
index 79f0b3ff4569e7f791a5c5b780b502e966eec118..4dd3565a85c8f318a5e9eff4865b52c50f44ce48 100644 |
--- a/chrome/browser/guest_view/guest_view_base.h |
+++ b/chrome/browser/guest_view/guest_view_base.h |
@@ -80,11 +80,21 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
// the initial set of frames within the page have completed loading. |
virtual void DidStopLoading() {} |
+ // This method can be overriden by subclasses. This method is called when |
lazyboy
2014/06/03 18:11:34
s/overriden/overridden, here and in other places.
Fady Samuel
2014/06/04 00:43:00
Done.
|
+ // the guest WebContents is about to be destroyed. This gives the derived |
lazyboy
2014/06/03 18:11:34
// Called when guest WC is about to be destroyed s
Fady Samuel
2014/06/04 00:43:00
Done.
|
+ // class an opportunity to perform some cleanup. |
+ virtual void WillBeDestroyed() {} |
lazyboy
2014/06/03 18:11:34
nit: "WillDestroy" is more common in chromium code
Fady Samuel
2014/06/04 00:43:00
Done.
|
+ |
// This method can be overridden by subclasses. It indicates that this guest's |
// embedder has been destroyed and the guest will be destroyed shortly. This |
// method gives derived classes the opportunity to perform some cleanup. |
virtual void EmbedderDestroyed() {} |
+ // This method can be overriden by subclasses. It indicates that the guest |
+ // WebContents has been destroyed. This gives subclasses an opportunity |
+ // to perform some cleanup. |
+ virtual void GuestDestroyed() {} |
+ |
// This method queries whether drag-and-drop is enabled for this particular |
// view. By default, drag-and-drop is disabled. Derived classes can override |
// this behavior to enable drag-and-drop. |
@@ -143,21 +153,11 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
void SetOpener(GuestViewBase* opener); |
- // WebContentsObserver implementation. |
- virtual void DidStopLoading( |
- content::RenderViewHost* render_view_host) OVERRIDE FINAL; |
- virtual void WebContentsDestroyed() OVERRIDE; |
- |
- // WebContentsDelegate implementation. |
- virtual bool ShouldFocusPageAfterCrash() OVERRIDE; |
- virtual bool PreHandleGestureEvent( |
- content::WebContents* source, |
- const blink::WebGestureEvent& event) OVERRIDE; |
- |
// BrowserPluginGuestDelegate implementation. |
- virtual void Destroy() OVERRIDE; |
+ virtual void Destroy() OVERRIDE FINAL; |
virtual void RegisterDestructionCallback( |
- const DestructionCallback& callback) OVERRIDE; |
+ const DestructionCallback& callback) OVERRIDE FINAL; |
+ |
protected: |
GuestViewBase(int guest_instance_id, |
content::WebContents* guest_web_contents, |
@@ -172,6 +172,17 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
void SendQueuedEvents(); |
+ // WebContentsObserver implementation. |
+ virtual void DidStopLoading( |
+ content::RenderViewHost* render_view_host) OVERRIDE FINAL; |
+ virtual void WebContentsDestroyed() OVERRIDE FINAL; |
+ |
+ // WebContentsDelegate implementation. |
+ virtual bool ShouldFocusPageAfterCrash() OVERRIDE FINAL; |
+ virtual bool PreHandleGestureEvent( |
+ content::WebContents* source, |
+ const blink::WebGestureEvent& event) OVERRIDE FINAL; |
+ |
content::WebContents* embedder_web_contents_; |
const std::string embedder_extension_id_; |
int embedder_render_process_id_; |