Index: ui/aura/mus/focus_synchronizer.h |
diff --git a/ui/aura/mus/focus_synchronizer.h b/ui/aura/mus/focus_synchronizer.h |
index db2556d76155f0e1cdb8000f5a0ab6af217f901a..8a67a8b02ba192c6132262f8f0c582c365369bc1 100644 |
--- a/ui/aura/mus/focus_synchronizer.h |
+++ b/ui/aura/mus/focus_synchronizer.h |
@@ -17,6 +17,7 @@ class WindowTree; |
namespace aura { |
+class Env; |
class FocusSynchronizerDelegate; |
class WindowMus; |
@@ -52,6 +53,7 @@ class FocusSynchronizer : public client::FocusChangeObserver, |
// Overrided from EnvObserver: |
void OnWindowInitialized(Window* window) override; |
+ void OnWillDestroyEnv() override; |
void OnActiveFocusClientChanged(client::FocusClient* focus_client, |
Window* window) override; |
@@ -64,6 +66,9 @@ class FocusSynchronizer : public client::FocusChangeObserver, |
WindowMus* window_setting_focus_to_ = nullptr; |
WindowMus* focused_window_ = nullptr; |
+ // Cached so we can detect if Env is destroyed before us. |
sadrul
2016/12/16 02:17:48
When does this happen?
sky
2016/12/16 03:51:50
It appears content destroys Env before the WindowT
|
+ Env* env_; |
+ |
DISALLOW_COPY_AND_ASSIGN(FocusSynchronizer); |
}; |