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

Unified Diff: blimp/client/public/contents/blimp_contents_observer.h

Issue 2201433002: Migrate TabControlFeature from 0.5 to 0.6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some more compile error fix Created 4 years, 4 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 | « blimp/client/public/BUILD.gn ('k') | blimp/client/public/contents/blimp_contents_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a70c577d33dacc444b3cac180306d0de6aa043cc 100644
--- a/blimp/client/public/contents/blimp_contents_observer.h
+++ b/blimp/client/public/contents/blimp_contents_observer.h
@@ -11,19 +11,33 @@
namespace blimp {
namespace client {
+class BlimpContents;
+
// An observer API implemented by classes which are interested in various events
// related to BlimpContents.
class BlimpContentsObserver {
public:
- virtual ~BlimpContentsObserver() = default;
+ virtual ~BlimpContentsObserver();
// Invoked when the navigation state of the BlimpContents has changed.
virtual void OnNavigationStateChanged() {}
+ // Called by BlimpContentsDying().
+ virtual void OnContentsDestroyed() {}
+
+ // Invoke when the destructor of blimp contents is called. This will clear
+ // the contents_ to nullptr.
+ void BlimpContentsDying();
+
+ BlimpContents* blimp_contents() { return contents_; }
+
protected:
- BlimpContentsObserver() {}
+ explicit BlimpContentsObserver(BlimpContents* blimp_contents);
private:
+ // The BlimpContents being tracked by this BlimpContentsObserver.
+ BlimpContents* contents_;
+
DISALLOW_COPY_AND_ASSIGN(BlimpContentsObserver);
};
« no previous file with comments | « blimp/client/public/BUILD.gn ('k') | blimp/client/public/contents/blimp_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698