| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_AURA_MUS_FOCUS_SYNCHRONIZER_H_ | 5 #ifndef UI_AURA_MUS_FOCUS_SYNCHRONIZER_H_ |
| 6 #define UI_AURA_MUS_FOCUS_SYNCHRONIZER_H_ | 6 #define UI_AURA_MUS_FOCUS_SYNCHRONIZER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/aura/client/focus_change_observer.h" | 9 #include "ui/aura/client/focus_change_observer.h" |
| 10 #include "ui/aura/env_observer.h" | 10 #include "ui/aura/env_observer.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void SetActiveFocusClient(client::FocusClient* focus_client); | 46 void SetActiveFocusClient(client::FocusClient* focus_client); |
| 47 | 47 |
| 48 // Called internally to set |focused_window_| and update the server. | 48 // Called internally to set |focused_window_| and update the server. |
| 49 void SetFocusedWindow(WindowMus* window); | 49 void SetFocusedWindow(WindowMus* window); |
| 50 | 50 |
| 51 // Overriden from client::FocusChangeObserver: | 51 // Overriden from client::FocusChangeObserver: |
| 52 void OnWindowFocused(Window* gained_focus, Window* lost_focus) override; | 52 void OnWindowFocused(Window* gained_focus, Window* lost_focus) override; |
| 53 | 53 |
| 54 // Overrided from EnvObserver: | 54 // Overrided from EnvObserver: |
| 55 void OnWindowInitialized(Window* window) override; | 55 void OnWindowInitialized(Window* window) override; |
| 56 void OnWillDestroyEnv() override; | |
| 57 void OnActiveFocusClientChanged(client::FocusClient* focus_client, | 56 void OnActiveFocusClientChanged(client::FocusClient* focus_client, |
| 58 Window* window) override; | 57 Window* window) override; |
| 59 | 58 |
| 60 FocusSynchronizerDelegate* delegate_; | 59 FocusSynchronizerDelegate* delegate_; |
| 61 ui::mojom::WindowTree* window_tree_; | 60 ui::mojom::WindowTree* window_tree_; |
| 62 | 61 |
| 63 client::FocusClient* active_focus_client_ = nullptr; | 62 client::FocusClient* active_focus_client_ = nullptr; |
| 64 | 63 |
| 65 bool setting_focus_ = false; | 64 bool setting_focus_ = false; |
| 66 WindowMus* window_setting_focus_to_ = nullptr; | 65 WindowMus* window_setting_focus_to_ = nullptr; |
| 67 WindowMus* focused_window_ = nullptr; | 66 WindowMus* focused_window_ = nullptr; |
| 68 | 67 |
| 69 // Cached so we can detect if Env is destroyed before us. | 68 // Cached so we can detect if Env is destroyed before us. |
| 70 Env* env_; | 69 Env* env_; |
| 71 | 70 |
| 72 DISALLOW_COPY_AND_ASSIGN(FocusSynchronizer); | 71 DISALLOW_COPY_AND_ASSIGN(FocusSynchronizer); |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 } // namespace aura | 74 } // namespace aura |
| 76 | 75 |
| 77 #endif // UI_AURA_MUS_FOCUS_SYNCHRONIZER_H_ | 76 #endif // UI_AURA_MUS_FOCUS_SYNCHRONIZER_H_ |
| OLD | NEW |