- 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:
Marshall Greenblatt
2012-06-28 17:21:18 +00:00
parent 14bbc90ddb
commit 421001ba9d
51 changed files with 2685 additions and 171 deletions

View File

@ -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;
}