mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add download handling support via new CefDownloadHandler and CefDownloadItem interfaces (issue #516).
- Fix setting of CefKeyEvent.focus_on_editable_field when the underlying RenderViewHost changes. - Fix potential crash if URLRequest objects are still in-progress upon shutdown. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@715 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -3,7 +3,11 @@
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "cefclient/client_handler.h"
|
||||
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "cefclient/resource.h"
|
||||
@ -66,3 +70,17 @@ void ClientHandler::SetNavState(bool canGoBack, bool canGoForward) {
|
||||
void ClientHandler::CloseMainWindow() {
|
||||
::PostMessage(m_MainHwnd, WM_CLOSE, 0, 0);
|
||||
}
|
||||
|
||||
std::string ClientHandler::GetDownloadPath(const std::string& file_name) {
|
||||
TCHAR szFolderPath[MAX_PATH];
|
||||
std::string path;
|
||||
|
||||
// Save the file in the user's "My Documents" folder.
|
||||
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL | CSIDL_FLAG_CREATE,
|
||||
NULL, 0, szFolderPath))) {
|
||||
path = CefString(szFolderPath);
|
||||
path += "\\" + file_name;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
Reference in New Issue
Block a user