diff options
author | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 21:40:33 +0000 |
---|---|---|
committer | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 21:40:33 +0000 |
commit | df0d9880016f04f8ee26b81843fe8b57807f9e12 (patch) | |
tree | e24a2d065e4656f706c61bb898b8844849ea8f70 /chrome/browser/extensions/extension_shelf_model.h | |
parent | 9cb52500ca39aff089dd21340cd2144bb628e309 (diff) | |
download | chromium_src-df0d9880016f04f8ee26b81843fe8b57807f9e12.zip chromium_src-df0d9880016f04f8ee26b81843fe8b57807f9e12.tar.gz chromium_src-df0d9880016f04f8ee26b81843fe8b57807f9e12.tar.bz2 |
Refactoring handle and dragging a bit in preparation for moles. The primary change for this is to get rid of the concept of a "current" toolstrip and the idea that there's only one handle around. Instead, each toolstrip has its own handle and each can be displaying it independently. There's some initial work for moles in there, but it's disabled since this will require some other plumbing to hook up properly.
Review URL: http://codereview.chromium.org/155192
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20544 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_shelf_model.h')
-rw-r--r-- | chrome/browser/extensions/extension_shelf_model.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extension_shelf_model.h b/chrome/browser/extensions/extension_shelf_model.h index 7af61f8..ab2af06 100644 --- a/chrome/browser/extensions/extension_shelf_model.h +++ b/chrome/browser/extensions/extension_shelf_model.h @@ -67,8 +67,8 @@ class ExtensionShelfModel : public NotificationObserver { // Add |toolstrip| to the end of the shelf. void AppendToolstrip(ExtensionHost* toolstrip); - // Insert |toolstrip| at |index|. - void InsertToolstripAt(int index, ExtensionHost* toolstrip); + // Insert |toolstrip| and |data| at |index|. + void InsertToolstripAt(int index, ExtensionHost* toolstrip, void* data); // Remove the toolstrip at |index|. void RemoveToolstripAt(int index); @@ -82,6 +82,10 @@ class ExtensionShelfModel : public NotificationObserver { // Return the toolstrip at |index|. Returns NULL if index is out of range. ExtensionHost* ToolstripAt(int index); + // Get/Set some arbitrary data associated with a particular toolstrip. + void SetToolstripDataAt(int index, void* data); + void* ToolstripDataAt(int index); + // NotificationObserver virtual void Observe(NotificationType type, const NotificationSource& source, @@ -113,7 +117,8 @@ class ExtensionShelfModel : public NotificationObserver { NotificationRegistrar registrar_; // The Toolstrips loaded in this model. The model owns these objects. - typedef std::vector<ExtensionHost*> ExtensionToolstrips; + typedef std::pair<ExtensionHost*, void*> ToolstripItem; + typedef std::vector<ToolstripItem> ExtensionToolstrips; ExtensionToolstrips toolstrips_; // Our observers. |