Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: ui/aura/mus/focus_synchronizer.h

Issue 2568303006: aura-mus: Implement Deactivate(). (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/aura/mus/focus_synchronizer.cc » ('j') | ui/aura/mus/window_tree_host_mus.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 class FocusSynchronizer : public client::FocusChangeObserver, 29 class FocusSynchronizer : public client::FocusChangeObserver,
30 public EnvObserver { 30 public EnvObserver {
31 public: 31 public:
32 FocusSynchronizer(FocusSynchronizerDelegate* delegate, 32 FocusSynchronizer(FocusSynchronizerDelegate* delegate,
33 ui::mojom::WindowTree* window_tree); 33 ui::mojom::WindowTree* window_tree);
34 ~FocusSynchronizer() override; 34 ~FocusSynchronizer() override;
35 35
36 // Called when the server side wants to change focus to |window|. 36 // Called when the server side wants to change focus to |window|.
37 void SetFocusFromServer(WindowMus* window); 37 void SetFocusFromServer(WindowMus* window);
38 38
39 // Called when the client wishes to deactivate itself.
40 void ClearFocus();
41
39 // Called when the focused window is destroyed. 42 // Called when the focused window is destroyed.
40 void OnFocusedWindowDestroyed(); 43 void OnFocusedWindowDestroyed();
41 44
42 WindowMus* focused_window() { return focused_window_; } 45 WindowMus* focused_window() { return focused_window_; }
43 46
44 private: 47 private:
45 void SetActiveFocusClient(client::FocusClient* focus_client); 48 void SetActiveFocusClient(client::FocusClient* focus_client);
46 49
47 // Called internally to set |focused_window_| and update the server. 50 // Called internally to set |focused_window_| and update the server.
48 void SetFocusedWindow(WindowMus* window); 51 void SetFocusedWindow(WindowMus* window);
(...skipping 14 matching lines...) Expand all
63 bool setting_focus_ = false; 66 bool setting_focus_ = false;
64 WindowMus* window_setting_focus_to_ = nullptr; 67 WindowMus* window_setting_focus_to_ = nullptr;
65 WindowMus* focused_window_ = nullptr; 68 WindowMus* focused_window_ = nullptr;
66 69
67 DISALLOW_COPY_AND_ASSIGN(FocusSynchronizer); 70 DISALLOW_COPY_AND_ASSIGN(FocusSynchronizer);
68 }; 71 };
69 72
70 } // namespace aura 73 } // namespace aura
71 74
72 #endif // UI_AURA_MUS_FOCUS_SYNCHRONIZER_H_ 75 #endif // UI_AURA_MUS_FOCUS_SYNCHRONIZER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/aura/mus/focus_synchronizer.cc » ('j') | ui/aura/mus/window_tree_host_mus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698