| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
| 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // This method is called after this GuestViewBase has been initiated. | 80 // This method is called after this GuestViewBase has been initiated. |
| 81 // | 81 // |
| 82 // This gives the derived class an opportunity to perform additional | 82 // This gives the derived class an opportunity to perform additional |
| 83 // initialization. | 83 // initialization. |
| 84 virtual void DidInitialize() {} | 84 virtual void DidInitialize() {} |
| 85 | 85 |
| 86 // This method is called when the initial set of frames within the page have | 86 // This method is called when the initial set of frames within the page have |
| 87 // completed loading. | 87 // completed loading. |
| 88 virtual void DidStopLoading() {} | 88 virtual void DidStopLoading() {} |
| 89 | 89 |
| 90 // This method is called before the guest will be detached from its embedder. |
| 91 // |embedder_web_contents_| should still be valid during this call. This |
| 92 // allows the derived class to perform some cleanup related to the embedder |
| 93 // web contents. |
| 94 virtual void WillDetachFromEmbedder() {} |
| 95 |
| 90 // This method is called when the guest's embedder WebContents has been | 96 // This method is called when the guest's embedder WebContents has been |
| 91 // destroyed and the guest will be destroyed shortly. | 97 // destroyed and the guest will be destroyed shortly. |
| 92 // | 98 // |
| 93 // This gives the derived class an opportunity to perform some cleanup prior | 99 // This gives the derived class an opportunity to perform some cleanup prior |
| 94 // to destruction. | 100 // to destruction. |
| 95 virtual void EmbedderDestroyed() {} | 101 virtual void EmbedderDestroyed() {} |
| 96 | 102 |
| 97 // This method is called when the guest WebContents has been destroyed. This | 103 // This method is called when the guest WebContents has been destroyed. This |
| 98 // object will be destroyed after this call returns. | 104 // object will be destroyed after this call returns. |
| 99 // | 105 // |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 // This is used to ensure pending tasks will not fire after this object is | 333 // This is used to ensure pending tasks will not fire after this object is |
| 328 // destroyed. | 334 // destroyed. |
| 329 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; | 335 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |
| 330 | 336 |
| 331 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); | 337 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); |
| 332 }; | 338 }; |
| 333 | 339 |
| 334 } // namespace extensions | 340 } // namespace extensions |
| 335 | 341 |
| 336 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 342 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
| OLD | NEW |