Chromium Code Reviews| Index: blimp/client/public/contents/blimp_contents_observer.h |
| diff --git a/blimp/client/public/contents/blimp_contents_observer.h b/blimp/client/public/contents/blimp_contents_observer.h |
| index dc3e1ec892ab03b6ee1fe4453337a05608e487b9..97ba59535af46d5ba555d4ab03bfbba8573ac181 100644 |
| --- a/blimp/client/public/contents/blimp_contents_observer.h |
| +++ b/blimp/client/public/contents/blimp_contents_observer.h |
| @@ -15,15 +15,26 @@ namespace client { |
| // related to BlimpContents. |
| class BlimpContentsObserver { |
| public: |
| - virtual ~BlimpContentsObserver() = default; |
| + virtual ~BlimpContentsObserver(); |
| // Invoked when the navigation state of the BlimpContents has changed. |
| virtual void OnNavigationStateChanged() {} |
| + // Invoked when the blimp contents is destroyed. |
| + virtual void OnContentsDestroyed(); |
| + |
| + BlimpContents* blimp_contents() { return contents_; } |
| + |
| protected: |
| - BlimpContentsObserver() {} |
| + explicit BlimpContentsObserver(BlimpContents* blimp_contents); |
| + |
| + // Can be used by subclass to clear the contents_ to nullptr. |
| + void ClearBlimpContents(); |
|
David Trainor- moved to gerrit
2016/08/06 04:32:58
See above, now that I think about it this should h
Menglin
2016/08/09 00:31:18
Done.
|
| private: |
| + // The BlimpContents being tracked by this BlimpContentsObserver. |
| + BlimpContents* contents_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(BlimpContentsObserver); |
| }; |