| Index: ui/aura/mus/focus_synchronizer.cc
|
| diff --git a/ui/aura/mus/focus_synchronizer.cc b/ui/aura/mus/focus_synchronizer.cc
|
| index 74ad3e09c8db15283e45a3f2a3818bd6027788a6..b211315fc9ca0c97d991b01993559d1fe0cd4d51 100644
|
| --- a/ui/aura/mus/focus_synchronizer.cc
|
| +++ b/ui/aura/mus/focus_synchronizer.cc
|
| @@ -16,16 +16,13 @@
|
|
|
| FocusSynchronizer::FocusSynchronizer(FocusSynchronizerDelegate* delegate,
|
| ui::mojom::WindowTree* window_tree)
|
| - : delegate_(delegate), window_tree_(window_tree), env_(Env::GetInstance()) {
|
| - DCHECK(env_);
|
| - env_->AddObserver(this);
|
| + : delegate_(delegate), window_tree_(window_tree) {
|
| + Env::GetInstance()->AddObserver(this);
|
| }
|
|
|
| FocusSynchronizer::~FocusSynchronizer() {
|
| - if (env_) {
|
| - SetActiveFocusClient(nullptr);
|
| - env_->RemoveObserver(this);
|
| - }
|
| + SetActiveFocusClient(nullptr);
|
| + Env::GetInstance()->RemoveObserver(this);
|
| }
|
|
|
| void FocusSynchronizer::SetFocusFromServer(WindowMus* window) {
|
| @@ -84,13 +81,6 @@
|
|
|
| void FocusSynchronizer::OnWindowInitialized(Window* window) {}
|
|
|
| -void FocusSynchronizer::OnWillDestroyEnv() {
|
| - // TODO(sky): this override should not be necessary. http://crbug.com/674803.
|
| - SetActiveFocusClient(nullptr);
|
| - env_->RemoveObserver(this);
|
| - env_ = nullptr;
|
| -}
|
| -
|
| void FocusSynchronizer::OnActiveFocusClientChanged(
|
| client::FocusClient* focus_client,
|
| Window* window) {
|
|
|