Implement BrowserClient::GetDefaultDownloadDirectory().
This commit is contained in:
parent
a866718b49
commit
7b6fbff40d
2 changed files with 12 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
|||
#include "browser/media/media_capture_devices_dispatcher.h"
|
||||
#include "browser/notification_presenter.h"
|
||||
|
||||
#include "base/base_paths.h"
|
||||
#include "base/path_service.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
|
||||
namespace brightray {
|
||||
|
@ -84,4 +86,13 @@ void BrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
|||
additional_schemes->push_back(content::kChromeUIScheme);
|
||||
}
|
||||
|
||||
base::FilePath BrowserClient::GetDefaultDownloadDirectory() {
|
||||
// ~/Downloads
|
||||
base::FilePath path;
|
||||
if (PathService::Get(base::DIR_HOME, &path))
|
||||
path = path.Append(FILE_PATH_LITERAL("Downloads"));
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
} // namespace brightray
|
||||
|
|
|
@ -49,6 +49,7 @@ class BrowserClient : public content::ContentBrowserClient {
|
|||
virtual content::MediaObserver* GetMediaObserver() OVERRIDE;
|
||||
virtual void GetAdditionalAllowedSchemesForFileSystem(
|
||||
std::vector<std::string>* additional_schemes) OVERRIDE;
|
||||
virtual base::FilePath GetDefaultDownloadDirectory() OVERRIDE;
|
||||
|
||||
BrowserMainParts* browser_main_parts_;
|
||||
scoped_ptr<NotificationPresenter> notification_presenter_;
|
||||
|
|
Loading…
Reference in a new issue