summaryrefslogtreecommitdiffstats
path: root/content/browser/tab_contents/tab_contents_delegate.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 11:43:30 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 11:43:30 +0000
commit60630b3f2984215bbeaa8e69a4286e61875170f6 (patch)
tree3cec0f648cf07ba8faf3f639b128d94d40e4be2f /content/browser/tab_contents/tab_contents_delegate.h
parent40edba20dd614164c5d01cbaea97a67b7baa1757 (diff)
downloadchromium_src-60630b3f2984215bbeaa8e69a4286e61875170f6.zip
chromium_src-60630b3f2984215bbeaa8e69a4286e61875170f6.tar.gz
chromium_src-60630b3f2984215bbeaa8e69a4286e61875170f6.tar.bz2
Helper functions for tracking stale TabContentsDelegate's.
BUG=85247 TEST=None Review URL: http://codereview.chromium.org/7244009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/tab_contents/tab_contents_delegate.h')
-rw-r--r--content/browser/tab_contents/tab_contents_delegate.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/content/browser/tab_contents/tab_contents_delegate.h b/content/browser/tab_contents/tab_contents_delegate.h
index 3ddbbf8..5ba62cf 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"
@@ -41,6 +42,8 @@ class TabContents;
// TabContents and to provide necessary functionality.
class TabContentsDelegate {
public:
+ TabContentsDelegate();
+
// When a main frame navigation occurs CreateMainFrameCommitDetails() is
// invoked. The |MainFrameCommitDetails| returned from
// CreateMainFrameCommitDetails() are then passed to
@@ -304,6 +307,18 @@ class TabContentsDelegate {
protected:
virtual ~TabContentsDelegate();
+
+ private:
+ friend class TabContents;
+
+ // Called when |this| becomes the TabContentsDelegate for |source|.
+ void Attach(TabContents* source);
+
+ // Called when |this| is no longer the TabContentsDelegate for |source|.
+ void Detach(TabContents* source);
+
+ // The TabContents that this is currently a delegate for.
+ std::set<TabContents*> attached_contents_;
};
#endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_