| Index: chrome/browser/download/download_status_updater_win.cc
|
| ===================================================================
|
| --- chrome/browser/download/download_status_updater_win.cc (revision 160674)
|
| +++ chrome/browser/download/download_status_updater_win.cc (working copy)
|
| @@ -7,15 +7,18 @@
|
| #include <string>
|
| #include <shobjidl.h>
|
|
|
| +#include "base/file_path.h"
|
| #include "base/logging.h"
|
| #include "base/stl_util.h"
|
| #include "base/string_number_conversions.h"
|
| #include "base/win/metro.h"
|
| #include "base/win/scoped_comptr.h"
|
| #include "base/win/windows_version.h"
|
| +#include "chrome/browser/platform_util.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| +#include "content/public/browser/browser_thread.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "grit/generated_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -67,6 +70,17 @@
|
| }
|
| }
|
|
|
| +void MetroDownloadNotificationClickedHandler(const wchar_t* download_path) {
|
| + // Metro chrome will invoke these handlers on the metro thread.
|
| + DCHECK(!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| +
|
| + // Ensure that we invoke the function to display the downloaded item on the
|
| + // UI thread.
|
| + content::BrowserThread::PostTask(
|
| + content::BrowserThread::UI, FROM_HERE,
|
| + base::Bind(platform_util::ShowItemInFolder, FilePath(download_path)));
|
| +}
|
| +
|
| } // namespace
|
|
|
| void DownloadStatusUpdater::UpdateAppIconDownloadProgress(
|
| @@ -116,7 +130,9 @@
|
| title.c_str(),
|
| body.c_str(),
|
| L"",
|
| - notification_id.c_str());
|
| + notification_id.c_str(),
|
| + MetroDownloadNotificationClickedHandler,
|
| + download->GetFullPath().value().c_str());
|
| }
|
| }
|
|
|
|
|