Index: chrome/browser/sidebar/sidebar_container.h |
=================================================================== |
--- chrome/browser/sidebar/sidebar_container.h (revision 71703) |
+++ chrome/browser/sidebar/sidebar_container.h (working copy) |
@@ -10,6 +10,7 @@ |
#include "base/basictypes.h" |
#include "base/scoped_ptr.h" |
#include "base/string16.h" |
+#include "chrome/browser/extensions/image_loading_tracker.h" |
#include "chrome/browser/tab_contents/tab_contents_delegate.h" |
class BrowserWindow; |
@@ -25,7 +26,8 @@ |
// tab it is linked to, mini tab icon, title etc. |
// |
class SidebarContainer |
- : public TabContentsDelegate { |
+ : public TabContentsDelegate, |
+ private ImageLoadingTracker::Observer { |
public: |
// Interface to implement to listen for sidebar update notification. |
class Delegate { |
@@ -37,7 +39,8 @@ |
DISALLOW_COPY_AND_ASSIGN(Delegate); |
}; |
- SidebarContainer(TabContents* tab, const std::string& content_id, |
+ SidebarContainer(TabContents* tab, |
+ const std::string& content_id, |
Delegate* delegate); |
virtual ~SidebarContainer(); |
@@ -45,6 +48,9 @@ |
// Does all the necessary cleanup. |
void SidebarClosing(); |
+ // Sets default sidebar parameters, as specified in extension manifest. |
+ void LoadDefaults(); |
+ |
// Returns sidebar's content id. |
const std::string& content_id() const { return content_id_; } |
@@ -110,6 +116,14 @@ |
virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} |
virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} |
+ // Overridden from ImageLoadingTracker::Observer. |
+ virtual void OnImageLoaded(SkBitmap* image, |
+ ExtensionResource resource, |
+ int index); |
+ |
+ // Returns an extension this sidebar belongs to. |
+ const Extension* GetExtension() const; |
+ |
// Contents of the tab this sidebar is linked to. |
TabContents* tab_; |
@@ -132,6 +146,13 @@ |
// Sidebar's title, displayed as a tooltip for sidebar's mini tab. |
string16 title_; |
+ bool navigate_to_default_url_on_expand_; |
Aaron Boodman
2011/01/20 00:36:11
Please add comments for these new fields.
Aleksey Shlyapnikov
2011/01/20 02:41:43
Done.
|
+ bool use_default_icon_; |
+ |
+ // The object that is waiting for the sidebar images loading to complete |
Aaron Boodman
2011/01/20 00:36:11
More accurate comment would be:
Helper to load ic
Aleksey Shlyapnikov
2011/01/20 02:41:43
Done.
|
+ // asynchronously. |
+ scoped_ptr<ImageLoadingTracker> image_loading_tracker_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SidebarContainer); |
}; |