- Change the way that application shutdown works in order to support JavaScript 'onbeforeunload' handling (issue #853). See comments in cef_life_span_handler.h for a detailed description of the new shutdown process.

- Fix a crash on Linux during window destruction (issue #681).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1149 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-03-19 22:59:33 +00:00
parent e3b297416f
commit 7ded60a218
33 changed files with 871 additions and 138 deletions

View File

@@ -236,6 +236,11 @@ class ClientHandler : public CefClient,
CefRefPtr<CefBrowser> GetBrowser() { return m_Browser; }
int GetBrowserId() { return m_BrowserId; }
// Returns true if the main browser window is currently closing. Used in
// combination with DoClose() and the OS close notification to properly handle
// 'onbeforeunload' JavaScript events during window close.
bool IsClosing() { return m_bIsClosing; }
std::string GetLogFile();
void SetLastDownloadFile(const std::string& fileName);
@@ -249,7 +254,6 @@ class ClientHandler : public CefClient,
NOTIFY_DOWNLOAD_ERROR,
};
void SendNotification(NotificationType type);
void CloseMainWindow();
void ShowDevTools(CefRefPtr<CefBrowser> browser);
@@ -297,6 +301,9 @@ class ClientHandler : public CefClient,
// The child browser id
int m_BrowserId;
// True if the main browser window is currently closing.
bool m_bIsClosing;
// The edit window handle
CefWindowHandle m_EditHwnd;
@@ -330,6 +337,10 @@ class ClientHandler : public CefClient,
// The startup URL.
std::string m_StartupURL;
// Number of currently existing browser windows. The application will exit
// when the number of windows reaches 0.
static int m_BrowserCount;
// Include the default reference counting implementation.
IMPLEMENT_REFCOUNTING(ClientHandler);
// Include the default locking implementation.