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

Unified Diff: blimp/client/core/contents/blimp_contents_impl.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
Index: blimp/client/core/contents/blimp_contents_impl.h
diff --git a/blimp/client/core/contents/blimp_contents_impl.h b/blimp/client/core/contents/blimp_contents_impl.h
index 38c457b8ba7b2710d34ae0aaa124db04728020f0..1110ccde6761bcdddd12dd9fc5bad20774843d16 100644
--- a/blimp/client/core/contents/blimp_contents_impl.h
+++ b/blimp/client/core/contents/blimp_contents_impl.h
@@ -29,7 +29,7 @@ class BlimpNavigationController;
class BlimpContentsImpl : public BlimpContents,
public BlimpNavigationControllerDelegate {
public:
- BlimpContentsImpl();
+ explicit BlimpContentsImpl(int id);
~BlimpContentsImpl() override;
#if defined(OS_ANDROID)
@@ -42,9 +42,14 @@ class BlimpContentsImpl : public BlimpContents,
void AddObserver(BlimpContentsObserver* observer) override;
void RemoveObserver(BlimpContentsObserver* observer) override;
+ // Check if some observer is in the observer list.
+ bool HasObserver(BlimpContentsObserver* observer);
+
// BlimpNavigationControllerDelegate implementation.
void OnNavigationStateChanged() override;
+ int id() { return id_; }
+
private:
// Handles the back/forward list and loading URLs.
BlimpNavigationControllerImpl navigation_controller_;
@@ -52,6 +57,10 @@ class BlimpContentsImpl : public BlimpContents,
// A list of all the observers of this BlimpContentsImpl.
base::ObserverList<BlimpContentsObserver> observers_;
+ // The id is assigned during contents creation. It is used by
+ // BlimpContentsManager to control the life time of the its observer.
+ int id_;
+
DISALLOW_COPY_AND_ASSIGN(BlimpContentsImpl);
};
« no previous file with comments | « blimp/client/core/contents/android/blimp_contents_observer_proxy.cc ('k') | blimp/client/core/contents/blimp_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698