OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ |
6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/mus/public/interfaces/window_tree.mojom.h" | 10 #include "components/mus/public/interfaces/window_tree.mojom.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // and the connection is configured to delete when there are no roots (the | 45 // and the connection is configured to delete when there are no roots (the |
46 // default), then after |root| is destroyed the connection is destroyed as | 46 // default), then after |root| is destroyed the connection is destroyed as |
47 // well. | 47 // well. |
48 virtual void OnUnembed(Window* root); | 48 virtual void OnUnembed(Window* root); |
49 | 49 |
50 // Called from the destructor of WindowTreeConnection after all the Windows | 50 // Called from the destructor of WindowTreeConnection after all the Windows |
51 // have been destroyed. |connection| is no longer valid after this call. | 51 // have been destroyed. |connection| is no longer valid after this call. |
52 virtual void OnConnectionLost(WindowTreeConnection* connection) = 0; | 52 virtual void OnConnectionLost(WindowTreeConnection* connection) = 0; |
53 | 53 |
54 // Called when the WindowTreeConnection receives an input event observed via | 54 // Called when the WindowTreeConnection receives an input event observed via |
55 // SetEventObserver(). | 55 // SetEventObserver(). |target| may be null for events that were sent to |
56 virtual void OnEventObserved(const ui::Event& event) = 0; | 56 // windows owned by other processes. |
| 57 virtual void OnEventObserved(const ui::Event& event, |
| 58 Window* target) = 0; |
57 | 59 |
58 protected: | 60 protected: |
59 virtual ~WindowTreeDelegate() {} | 61 virtual ~WindowTreeDelegate() {} |
60 }; | 62 }; |
61 | 63 |
62 } // namespace mus | 64 } // namespace mus |
63 | 65 |
64 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ | 66 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ |
OLD | NEW |