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 MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 | 11 |
12 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h" | |
13 | |
14 namespace mojo { | 12 namespace mojo { |
15 namespace view_manager { | 13 namespace view_manager { |
16 | 14 |
17 class View; | 15 class View; |
18 | 16 |
19 class ViewObserver { | 17 class ViewObserver { |
20 public: | 18 public: |
21 enum DispositionChangePhase { | 19 enum DispositionChangePhase { |
22 DISPOSITION_CHANGING, | 20 DISPOSITION_CHANGING, |
23 DISPOSITION_CHANGED | 21 DISPOSITION_CHANGED |
24 }; | 22 }; |
25 | 23 |
26 virtual void OnViewDestroy(View* view, DispositionChangePhase phase) {} | 24 virtual void OnViewDestroy(View* view, DispositionChangePhase phase) {} |
27 | 25 |
28 virtual void OnViewInputEvent(View* view, EventPtr event) {} | |
29 | |
30 protected: | 26 protected: |
31 virtual ~ViewObserver() {} | 27 virtual ~ViewObserver() {} |
32 }; | 28 }; |
33 | 29 |
34 } // namespace view_manager | 30 } // namespace view_manager |
35 } // namespace mojo | 31 } // namespace mojo |
36 | 32 |
37 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ | 33 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ |
OLD | NEW |