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

Unified Diff: chrome/browser/ui/tab_contents/core_tab_helper_delegate.h

Issue 10905301: Switch CoreTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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: chrome/browser/ui/tab_contents/core_tab_helper_delegate.h
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper_delegate.h b/chrome/browser/ui/tab_contents/core_tab_helper_delegate.h
index 3397f3d7920988c92c2b9ca509e6808fbfe42d4b..e06abb29ab39dd6e1baec96ffddfdf6ca51526df 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper_delegate.h
+++ b/chrome/browser/ui/tab_contents/core_tab_helper_delegate.h
@@ -7,26 +7,29 @@
#include "base/basictypes.h"
-class TabContents;
+namespace content {
+class WebContents;
+}
-// Objects implement this interface to get notified about changes in the
-// TabContents and to provide necessary functionality.
+// Objects implement this interface to get notified about changes in a
+// WebContents and to provide necessary functionality.
//
-// This is considered part of the TabContents "core" interface. If a piece of
-// code interacts with TabContent, it is guaranteed that it will need to handle
-// all of these callbacks.
+// This is the catch-all interface for holding additions to WebContents that are
+// needed when a WebContents is promoted to being a tab contents, but that
+// don't cleanly fit elsewhere.
class CoreTabHelperDelegate {
public:
- virtual void SwapTabContents(TabContents* old_tc,
- TabContents* new_tc);
+ // The caller is responsible for deleting |old_contents|.
+ virtual void SwapTabContents(content::WebContents* old_contents,
+ content::WebContents* new_contents);
- // Whether the specified TabContent can be reloaded.
- // Reloading can be disabled e. g. for the DevTools window.
- virtual bool CanReloadContents(TabContents* source) const;
+ // Whether the specified WebContents can be reloaded.
+ // Reloading can be disabled e.g. for the DevTools window.
+ virtual bool CanReloadContents(content::WebContents* web_contents) const;
- // Whether the specified TabContent can be saved.
- // Saving can be disabled e. g. for the DevTools window.
- virtual bool CanSaveContents(TabContents* source) const;
+ // Whether the specified WebContents can be saved.
+ // Saving can be disabled e.g. for the DevTools window.
+ virtual bool CanSaveContents(content::WebContents* web_contents) const;
protected:
virtual ~CoreTabHelperDelegate();
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.cc ('k') | chrome/browser/ui/tab_contents/core_tab_helper_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698