diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-12 02:25:13 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-12 02:25:13 +0000 |
commit | 27ee16ff2b9370d70fb93233b73ec01856f08017 (patch) | |
tree | 0ee062b116b1b7ab29d9546b37a2ec3cc461e3b5 /chrome/browser/download/download_util.cc | |
parent | d2a0e1ab98ab2e01fdb2cb77387e917c1d57b4c8 (diff) | |
download | chromium_src-27ee16ff2b9370d70fb93233b73ec01856f08017.zip chromium_src-27ee16ff2b9370d70fb93233b73ec01856f08017.tar.gz chromium_src-27ee16ff2b9370d70fb93233b73ec01856f08017.tar.bz2 |
Unify and clean up system download notifications, add Mountain Lion support.
BUG=138962
TEST=as in bug
Review URL: https://chromiumcodereview.appspot.com/10827207
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151195 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_util.cc')
-rw-r--r-- | chrome/browser/download/download_util.cc | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index b5a6a2e..7b940aa 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -27,8 +27,6 @@ #include "chrome/browser/download/download_extensions.h" #include "chrome/browser/download/download_item_model.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_window.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/time_format.h" @@ -52,12 +50,6 @@ #include "ui/gfx/image/image.h" #include "ui/gfx/rect.h" -#if defined(OS_WIN) -#include <shobjidl.h> - -#include "base/win/windows_version.h" -#endif - #if defined(TOOLKIT_VIEWS) #include "ui/base/dragdrop/drag_drop_types.h" #include "ui/base/dragdrop/drag_utils.h" @@ -68,12 +60,9 @@ #if defined(TOOLKIT_GTK) #include "chrome/browser/ui/gtk/custom_drag.h" -#include "chrome/browser/ui/gtk/unity_service.h" #endif // defined(TOOLKIT_GTK) #if defined(OS_WIN) && !defined(USE_AURA) -#include "base/win/scoped_comptr.h" -#include "chrome/browser/ui/browser_list.h" #include "ui/base/dragdrop/drag_source.h" #include "ui/base/dragdrop/os_exchange_data_provider_win.h" #endif @@ -554,53 +543,6 @@ string16 GetProgressStatusText(DownloadItem* download) { speed_text, amount, time_remaining); } -#if !defined(OS_MACOSX) -void UpdateAppIconDownloadProgress(int download_count, - bool progress_known, - float progress) { -#if defined(USE_AURA) - // TODO(davemoore) Implement once UX for download is decided <104742> -#elif defined(OS_WIN) - // Taskbar progress bar is only supported on Win7. - if (base::win::GetVersion() < base::win::VERSION_WIN7) - return; - - base::win::ScopedComPtr<ITaskbarList3> taskbar; - HRESULT result = taskbar.CreateInstance(CLSID_TaskbarList, NULL, - CLSCTX_INPROC_SERVER); - if (FAILED(result)) { - VLOG(1) << "Failed creating a TaskbarList object: " << result; - return; - } - - result = taskbar->HrInit(); - if (FAILED(result)) { - LOG(ERROR) << "Failed initializing an ITaskbarList3 interface."; - return; - } - - // Iterate through all the browser windows, and draw the progress bar. - for (BrowserList::const_iterator browser_iterator = BrowserList::begin(); - browser_iterator != BrowserList::end(); browser_iterator++) { - Browser* browser = *browser_iterator; - BrowserWindow* window = browser->window(); - if (!window) - continue; - HWND frame = window->GetNativeWindow(); - if (download_count == 0 || progress == 1.0f) - taskbar->SetProgressState(frame, TBPF_NOPROGRESS); - else if (!progress_known) - taskbar->SetProgressState(frame, TBPF_INDETERMINATE); - else - taskbar->SetProgressValue(frame, static_cast<int>(progress * 100), 100); - } -#elif defined(TOOLKIT_GTK) - unity::SetDownloadCount(download_count); - unity::SetProgressFraction(progress); -#endif -} -#endif - FilePath GetCrDownloadPath(const FilePath& suggested_path) { return FilePath(suggested_path.value() + FILE_PATH_LITERAL(".crdownload")); } |