Index: chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm |
=================================================================== |
--- chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm (revision 182229) |
+++ chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm (working copy) |
@@ -4,9 +4,7 @@ |
#include "chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h" |
-#include "base/bind.h" |
#include "base/mac/mac_util.h" |
-#include "base/message_loop.h" |
#include "base/sys_string_conversions.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/cocoa/browser_window_utils.h" |
@@ -681,13 +679,7 @@ |
void NativeAppWindowCocoa::WindowWillClose() { |
[window_controller_ setAppWindow:NULL]; |
shell_window_->OnNativeWindowChanged(); |
- // On other platforms, the native window doesn't get destroyed synchronously. |
- // We simulate that here so that ShellWindow can assume that it doesn't get |
- // deleted immediately upon calling Close(). |
- MessageLoop::current()->PostTask( |
- FROM_HERE, |
- base::Bind(&ShellWindow::OnNativeClose, |
- base::Unretained(shell_window_))); |
+ shell_window_->OnNativeClose(); |
} |
void NativeAppWindowCocoa::WindowDidBecomeKey() { |