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

Unified Diff: content/browser/tab_contents/tab_contents_delegate.h

Issue 7244009: Helper functions for tracking stale TabContentsDelegate's. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style and destructor Created 9 years, 6 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: content/browser/tab_contents/tab_contents_delegate.h
diff --git a/content/browser/tab_contents/tab_contents_delegate.h b/content/browser/tab_contents/tab_contents_delegate.h
index 0645128b9add09ea15037d25547eb3260f806efb..f0cb0d2bcce6370168fc5c588b91bf8ccb994473 100644
--- a/content/browser/tab_contents/tab_contents_delegate.h
+++ b/content/browser/tab_contents/tab_contents_delegate.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
#pragma once
+#include <set>
#include <string>
#include "base/basictypes.h"
@@ -50,6 +51,12 @@ class TabContentsDelegate {
virtual ~MainFrameCommitDetails() {}
};
+ // Called when |this| becomes the TabContentsDelegate for |source|.
sky 2011/06/23 18:51:27 I don't like seeing these in the public section. H
cbentzel 2011/06/23 19:09:57 Done.
+ void Attach(TabContents* source);
+
+ // Called when |this| is no longer the TabContentsDelegate for |source|.
+ void Detach(TabContents* source);
+
// Opens a new URL inside the passed in TabContents (if source is 0 open
// in the current front-most tab), unless |disposition| indicates the url
// should be opened in a new tab or window.
@@ -310,6 +317,9 @@ class TabContentsDelegate {
protected:
virtual ~TabContentsDelegate();
+
+ private:
+ std::set<TabContents*> attached_contents_;
};
#endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698