diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 20:16:50 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 20:16:50 +0000 |
commit | 76960a40e09420ac2e302f4b307c4dd0d8a61ce8 (patch) | |
tree | 8f6a5642af430f77528fd479eba63dfae42169d8 /chrome/browser/tab_contents.h | |
parent | 45cbfb0444d2ae27d9dbc9880c547c0d42978782 (diff) | |
download | chromium_src-76960a40e09420ac2e302f4b307c4dd0d8a61ce8.zip chromium_src-76960a40e09420ac2e302f4b307c4dd0d8a61ce8.tar.gz chromium_src-76960a40e09420ac2e302f4b307c4dd0d8a61ce8.tar.bz2 |
Add PropertyBag to TabContents. Convert the autocomplete state as a proof of concept. Add necessary const accessors to property bag.
BUG=5260
Review URL: http://codereview.chromium.org/13707
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents.h')
-rw-r--r-- | chrome/browser/tab_contents.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/chrome/browser/tab_contents.h b/chrome/browser/tab_contents.h index 4ff6a44..0c40e36 100644 --- a/chrome/browser/tab_contents.h +++ b/chrome/browser/tab_contents.h @@ -15,6 +15,7 @@ #include "chrome/browser/page_navigator.h" #include "chrome/browser/tab_contents_type.h" #include "chrome/common/navigation_types.h" +#include "chrome/common/property_bag.h" namespace gfx { class Rect; @@ -112,6 +113,12 @@ class TabContents : public PageNavigator, // Returns the type of tab this is. See also the As* functions following. TabContentsType type() const { return type_; } + // Returns the property bag for this tab contents, where callers can add + // extra data they may wish to associate with the tab. Returns a pointer + // rather than a reference since the PropertyAccessors expect this. + const PropertyBag* property_bag() const { return &property_bag_; } + PropertyBag* property_bag() { return &property_bag_; } + // Returns this object as a WebContents if it is one, and NULL otherwise. virtual WebContents* AsWebContents() { return NULL; } @@ -220,16 +227,6 @@ class TabContents : public PageNavigator, // Internal state ------------------------------------------------------------ - // For use when switching tabs, these functions allow the tab contents to - // hold the per-tab state of the location bar. The tab contents takes - // ownership of the pointer. - void set_saved_location_bar_state(const AutocompleteEditState* state) { - saved_location_bar_state_.reset(state); - } - const AutocompleteEditState* saved_location_bar_state() const { - return saved_location_bar_state_.get(); - } - // This flag indicates whether the tab contents is currently being // screenshotted by the DraggedTabController. bool capturing_contents() const { return capturing_contents_; } @@ -512,6 +509,8 @@ class TabContents : public PageNavigator, TabContentsDelegate* delegate_; NavigationController* controller_; + PropertyBag property_bag_; + // Indicates whether we're currently loading a resource. bool is_loading_; @@ -523,8 +522,6 @@ class TabContents : public PageNavigator, // See waiting_for_response() above. bool waiting_for_response_; - scoped_ptr<const AutocompleteEditState> saved_location_bar_state_; - // The download shelf view (view at the bottom of the page). scoped_ptr<DownloadShelfView> download_shelf_view_; |