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_AURA_WINDOW_PORT_H_ | 5 #ifndef UI_AURA_WINDOW_PORT_H_ |
6 #define UI_AURA_WINDOW_PORT_H_ | 6 #define UI_AURA_WINDOW_PORT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const gfx::Rect& new_bounds) = 0; | 59 const gfx::Rect& new_bounds) = 0; |
60 | 60 |
61 // Called before a property is changed. The return value from this is supplied | 61 // Called before a property is changed. The return value from this is supplied |
62 // into OnPropertyChanged() so that WindowPort may pass data between the two | 62 // into OnPropertyChanged() so that WindowPort may pass data between the two |
63 // calls. | 63 // calls. |
64 virtual std::unique_ptr<ui::PropertyData> OnWillChangeProperty( | 64 virtual std::unique_ptr<ui::PropertyData> OnWillChangeProperty( |
65 const void* key) = 0; | 65 const void* key) = 0; |
66 | 66 |
67 // Called after a property changes, but before observers are notified. |data| | 67 // Called after a property changes, but before observers are notified. |data| |
68 // is the return value from OnWillChangeProperty(). | 68 // is the return value from OnWillChangeProperty(). |
69 virtual void OnPropertyChanged( | 69 virtual void OnPropertyChanged(const void* key, |
70 const void* key, | 70 int64_t old_value, |
71 std::unique_ptr<ui::PropertyData> data) = 0; | 71 std::unique_ptr<ui::PropertyData> data) = 0; |
72 | 72 |
73 protected: | 73 protected: |
74 // Returns the WindowPort associated with a Window. | 74 // Returns the WindowPort associated with a Window. |
75 static WindowPort* Get(Window* window); | 75 static WindowPort* Get(Window* window); |
76 | 76 |
77 // Returns the ObserverList of a Window. | 77 // Returns the ObserverList of a Window. |
78 static base::ObserverList<WindowObserver, true>* GetObservers(Window* window); | 78 static base::ObserverList<WindowObserver, true>* GetObservers(Window* window); |
79 }; | 79 }; |
80 | 80 |
81 } // namespace aura | 81 } // namespace aura |
82 | 82 |
83 #endif // UI_AURA_WINDOW_PORT_H_ | 83 #endif // UI_AURA_WINDOW_PORT_H_ |
OLD | NEW |