| 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_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ | 5 #ifndef UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ |
| 6 #define UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ | 6 #define UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 void AddPointerWatcher(PointerWatcher* watcher, bool want_moves); | 37 void AddPointerWatcher(PointerWatcher* watcher, bool want_moves); |
| 38 void RemovePointerWatcher(PointerWatcher* watcher); | 38 void RemovePointerWatcher(PointerWatcher* watcher); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 // Returns true if there is one or more watchers for this client. | 41 // Returns true if there is one or more watchers for this client. |
| 42 bool HasPointerWatcher(); | 42 bool HasPointerWatcher(); |
| 43 | 43 |
| 44 // ui::WindowTreeClientObserver: | 44 // ui::WindowTreeClientObserver: |
| 45 void OnWindowTreeCaptureChanged(ui::Window* gained_capture, | 45 void OnWindowTreeCaptureChanged(ui::Window* gained_capture, |
| 46 ui::Window* lost_capture) override; | 46 ui::Window* lost_capture) override; |
| 47 void OnWillDestroyClient(ui::WindowTreeClient* client) override; | 47 void OnDidDestroyClient(ui::WindowTreeClient* client) override; |
| 48 | 48 |
| 49 ui::WindowTreeClient* window_tree_client_; | 49 ui::WindowTreeClient* window_tree_client_; |
| 50 base::ObserverList<PointerWatcher, true> pointer_watchers_; | 50 base::ObserverList<PointerWatcher, true> pointer_watchers_; |
| 51 bool pointer_watcher_want_moves_ = false; | 51 bool pointer_watcher_want_moves_ = false; |
| 52 | 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(PointerWatcherEventRouter); | 53 DISALLOW_COPY_AND_ASSIGN(PointerWatcherEventRouter); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace views | 56 } // namespace views |
| 57 | 57 |
| 58 #endif // UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ | 58 #endif // UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ |
| OLD | NEW |