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> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/callback.h" | |
13 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
14 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
15 #include "ui/aura/aura_export.h" | 16 #include "ui/aura/aura_export.h" |
16 #include "ui/base/class_property.h" | 17 #include "ui/base/class_property.h" |
17 | 18 |
19 namespace cc { | |
20 class CompositorFrameSink; | |
21 } | |
22 | |
18 namespace gfx { | 23 namespace gfx { |
19 class Rect; | 24 class Rect; |
20 } | 25 } |
21 | 26 |
22 namespace aura { | 27 namespace aura { |
23 | 28 |
24 class Window; | 29 class Window; |
25 class WindowObserver; | 30 class WindowObserver; |
26 | 31 |
27 // WindowPort defines an interface to enable Window to be used with or without | 32 // WindowPort defines an interface to enable Window to be used with or without |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 // calls. | 68 // calls. |
64 virtual std::unique_ptr<ui::PropertyData> OnWillChangeProperty( | 69 virtual std::unique_ptr<ui::PropertyData> OnWillChangeProperty( |
65 const void* key) = 0; | 70 const void* key) = 0; |
66 | 71 |
67 // Called after a property changes, but before observers are notified. |data| | 72 // Called after a property changes, but before observers are notified. |data| |
68 // is the return value from OnWillChangeProperty(). | 73 // is the return value from OnWillChangeProperty(). |
69 virtual void OnPropertyChanged(const void* key, | 74 virtual void OnPropertyChanged(const void* key, |
70 int64_t old_value, | 75 int64_t old_value, |
71 std::unique_ptr<ui::PropertyData> data) = 0; | 76 std::unique_ptr<ui::PropertyData> data) = 0; |
72 | 77 |
78 // Called for creating a cc::CompositorFrameSink for the window. | |
79 virtual std::unique_ptr<cc::CompositorFrameSink> | |
80 OnCreateCompositorFrameSink() = 0; | |
Fady Samuel
2017/05/08 15:52:09
CreateCompositorFrameSink.
Peng
2017/05/08 17:44:39
Done.
| |
81 | |
82 virtual void OnWindowAddedToRootWindow() = 0; | |
83 virtual void OnWindowRemovingFromRootWindow() = 0; | |
84 | |
73 protected: | 85 protected: |
74 // Returns the WindowPort associated with a Window. | 86 // Returns the WindowPort associated with a Window. |
75 static WindowPort* Get(Window* window); | 87 static WindowPort* Get(Window* window); |
76 | 88 |
77 // Returns the ObserverList of a Window. | 89 // Returns the ObserverList of a Window. |
78 static base::ObserverList<WindowObserver, true>* GetObservers(Window* window); | 90 static base::ObserverList<WindowObserver, true>* GetObservers(Window* window); |
79 }; | 91 }; |
80 | 92 |
81 } // namespace aura | 93 } // namespace aura |
82 | 94 |
83 #endif // UI_AURA_WINDOW_PORT_H_ | 95 #endif // UI_AURA_WINDOW_PORT_H_ |
OLD | NEW |