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_VIEW_MANAGER_PUBLIC_CPP_VIEW_OBSERVER_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_VIEW_OBSERVER_H_ |
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_OBSERVER_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_VIEW_OBSERVER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "components/view_manager/public/cpp/view.h" | 10 #include "components/mus/public/cpp/view.h" |
11 #include "ui/mojo/events/input_events.mojom.h" | 11 #include "ui/mojo/events/input_events.mojom.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 | 14 |
15 class View; | 15 class View; |
16 | 16 |
17 // A note on -ing and -ed suffixes: | 17 // A note on -ing and -ed suffixes: |
18 // | 18 // |
19 // -ing methods are called before changes are applied to the local view model. | 19 // -ing methods are called before changes are applied to the local view model. |
20 // -ed methods are called after changes are applied to the local view model. | 20 // -ed methods are called after changes are applied to the local view model. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 View* view, | 75 View* view, |
76 const std::string& name, | 76 const std::string& name, |
77 const std::vector<uint8_t>* old_data, | 77 const std::vector<uint8_t>* old_data, |
78 const std::vector<uint8_t>* new_data) {} | 78 const std::vector<uint8_t>* new_data) {} |
79 | 79 |
80 // Invoked when SetProperty() or ClearProperty() is called on the window. | 80 // Invoked when SetProperty() or ClearProperty() is called on the window. |
81 // |key| is either a WindowProperty<T>* (SetProperty, ClearProperty). Either | 81 // |key| is either a WindowProperty<T>* (SetProperty, ClearProperty). Either |
82 // way, it can simply be compared for equality with the property | 82 // way, it can simply be compared for equality with the property |
83 // constant. |old| is the old property value, which must be cast to the | 83 // constant. |old| is the old property value, which must be cast to the |
84 // appropriate type before use. | 84 // appropriate type before use. |
85 virtual void OnViewLocalPropertyChanged( | 85 virtual void OnViewLocalPropertyChanged(View* view, |
86 View* view, | 86 const void* key, |
87 const void* key, | 87 intptr_t old) {} |
88 intptr_t old) {} | |
89 | 88 |
90 virtual void OnViewEmbeddedAppDisconnected(View* view) {} | 89 virtual void OnViewEmbeddedAppDisconnected(View* view) {} |
91 | 90 |
92 // Sent when the drawn state changes. This is only sent for the root nodes | 91 // Sent when the drawn state changes. This is only sent for the root nodes |
93 // when embedded. | 92 // when embedded. |
94 virtual void OnViewDrawnChanging(View* view) {} | 93 virtual void OnViewDrawnChanging(View* view) {} |
95 virtual void OnViewDrawnChanged(View* view) {} | 94 virtual void OnViewDrawnChanged(View* view) {} |
96 | 95 |
97 protected: | 96 protected: |
98 virtual ~ViewObserver() {} | 97 virtual ~ViewObserver() {} |
99 }; | 98 }; |
100 | 99 |
101 } // namespace mojo | 100 } // namespace mojo |
102 | 101 |
103 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_OBSERVER_H_ | 102 #endif // COMPONENTS_MUS_PUBLIC_CPP_VIEW_OBSERVER_H_ |
OLD | NEW |