mac: Remove access to webContents in windowWillUseStandardFrame

This commit is contained in:
Cheng Zhao 2018-03-06 12:03:12 +09:00
parent e73326a324
commit cad3d694ab
6 changed files with 21 additions and 7 deletions

View file

@ -307,6 +307,10 @@ void BrowserWindow::WillCloseWindow(bool* prevent_default) {
*prevent_default = Emit("close");
}
void BrowserWindow::RequestPreferredWidth(int* width) {
*width = web_contents()->GetPreferredSize().width();
}
void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) {
// When user tries to close the window by clicking the close button, we do
// not close the window immediately, instead we try to close the web page