Chromium Code Reviews| Index: chrome/browser/lifetime/application_lifetime_aura.cc |
| diff --git a/chrome/browser/lifetime/application_lifetime_aura.cc b/chrome/browser/lifetime/application_lifetime_aura.cc |
| index dae1f3eeff01ffe41cf320e10f19f18df47d73ff..4bd1f039403a2224d55256575a417be9180b3cb2 100644 |
| --- a/chrome/browser/lifetime/application_lifetime_aura.cc |
| +++ b/chrome/browser/lifetime/application_lifetime_aura.cc |
| @@ -19,13 +19,18 @@ namespace browser { |
| void HandleAppExitingForPlatform() { |
| // Close all non browser windows now. Those includes notifications |
| // and windows created by Ash (launcher, background, etc). |
| - g_browser_process->notification_ui_manager()->CancelAll(); |
| - |
| #if defined(USE_ASH) |
| - // Releasing the capture will close any menus that might be open: |
| - // http://crbug.com/134472 |
| - aura::client::GetCaptureClient(ash::Shell::GetPrimaryRootWindow())-> |
| - SetCapture(NULL); |
| + // This may be called before ASH is initialized when XIOError is reported. |
|
Daniel Erat
2012/09/19 20:47:33
nit: s/ASH/Ash/ or just "ash"
oshima
2012/09/19 21:21:28
changed to |ash::Shell|
|
| + // crbug.com/150633. |
| + if (ash::Shell::HasInstance()) { |
| + g_browser_process->notification_ui_manager()->CancelAll(); |
| + // Releasing the capture will close any menus that might be open: |
| + // http://crbug.com/134472 |
| + aura::client::GetCaptureClient(ash::Shell::GetPrimaryRootWindow())-> |
| + SetCapture(NULL); |
| + } |
| +#else |
| + g_browser_process->notification_ui_manager()->CancelAll(); |
| #endif |
| // TODO(oshima): Close all non browser windows here while |