summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 22:19:41 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 22:19:41 +0000
commit3edd952ea05dfb5c950b63768fc9cc9ec807f6d8 (patch)
treea78e9bef8fe0efbff8b56fb6c6f8bc23e344c46e /chrome/common
parentc0a2ee2bb8bfcc3ade688d43a95cc3404eea3748 (diff)
downloadchromium_src-3edd952ea05dfb5c950b63768fc9cc9ec807f6d8.zip
chromium_src-3edd952ea05dfb5c950b63768fc9cc9ec807f6d8.tar.gz
chromium_src-3edd952ea05dfb5c950b63768fc9cc9ec807f6d8.tar.bz2
Basic download shelf implementation on linux.
It shows and hides at appropriate times, and that's about it. TEST=navigate to a savable page and select "save page as" from the page menu. Click the x. Save the page again. The shelf should pop up, go away, pop up again. Review URL: http://codereview.chromium.org/38004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10927 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc37
-rw-r--r--chrome/common/temp_scaffolding_stubs.h13
2 files changed, 25 insertions, 25 deletions
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index c8f570b..5cd4428 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -379,30 +379,29 @@ void TabContents::SetIsCrashed(bool state) {
delegate_->ContentsStateChanged(this);
}
-void TabContents::SetDownloadShelfVisible(bool visible) {
- if (shelf_visible_ != visible) {
- if (visible) {
- // Invoke GetDownloadShelf to force the shelf to be created.
- GetDownloadShelf();
- }
- shelf_visible_ = visible;
-
- if (delegate_)
- delegate_->ContentsStateChanged(this);
- }
+#if defined(OS_MACOSX)
+void TabContents::OnStartDownload(DownloadItem* download){
+ NOTIMPLEMENTED();
+}
+
+DownloadShelf* TabContents::GetDownloadShelf(){
+ NOTIMPLEMENTED();
+ return NULL;
+}
- // SetShelfVisible can force-close the shelf, so make sure we lay out
- // everything correctly, as if the animation had finished. This doesn't
- // matter for showing the shelf, as the show animation will do it.
- ToolbarSizeChanged(false);
+void TabContents::ReleaseDownloadShelf() {
+ NOTIMPLEMENTED();
}
-void TabContents::ToolbarSizeChanged(bool is_animating) {
- TabContentsDelegate* d = delegate();
- if (d)
- d->ToolbarSizeChanged(this, is_animating);
+void TabContents::MigrateShelf(TabContents* from, TabContents* to){
+ NOTIMPLEMENTED();
}
+void TabContents::MigrateShelfFrom(TabContents* tab_contents){
+ NOTIMPLEMENTED();
+}
+#endif
+
//--------------------------------------------------------------------------
void RLZTracker::CleanupRlz() {
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 20e93d4..ca7cf64 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -25,6 +25,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/cache_manager_host.h"
#include "chrome/browser/cancelable_request.h"
+#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/download/save_types.h"
#include "chrome/browser/history/download_types.h"
#include "chrome/browser/history/history.h"
@@ -63,7 +64,6 @@ class CPCommandInterface;
class DOMUIHost;
class DownloadItem;
class DownloadManager;
-class DownloadShelf;
class HistoryService;
class LoginHandler;
class MetricsService;
@@ -488,24 +488,25 @@ class TabContents : public PageNavigator, public NotificationObserver {
static void RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kBlockPopups, false);
}
- static void MigrateShelf(TabContents* from, TabContents* to) {
- NOTIMPLEMENTED();
- }
virtual void CreateView() {}
virtual gfx::NativeView GetNativeView() const { return NULL; }
static TabContentsFactory* RegisterFactory(TabContentsType type,
TabContentsFactory* factory);
- void OnStartDownload(DownloadItem* download) { NOTIMPLEMENTED(); }
void RemoveInfoBar(InfoBarDelegate* delegate) { NOTIMPLEMENTED(); }
virtual bool ShouldDisplayURL() { return true; }
void ToolbarSizeChanged(bool is_animating);
- DownloadShelf* GetDownloadShelf() { NOTIMPLEMENTED(); return NULL; }
+ void OnStartDownload(DownloadItem* download);
+ DownloadShelf* GetDownloadShelf();
+ static void MigrateShelf(TabContents* from, TabContents* to);
+ void MigrateShelfFrom(TabContents* tab_contents);
protected:
typedef std::vector<ConstrainedWindow*> ConstrainedWindowList;
ConstrainedWindowList child_windows_;
private:
+ virtual void ReleaseDownloadShelf();
friend class AutomationProvider;
+ scoped_ptr<DownloadShelf> download_shelf_;
TabContentsType type_;
bool is_crashed_;
bool is_active_;