OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_MUS_WINDOW_MANAGER_DELEGATE_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
6 #define UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ | 6 #define UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 virtual Window* OnWmCreateTopLevelWindow( | 110 virtual Window* OnWmCreateTopLevelWindow( |
111 ui::mojom::WindowType window_type, | 111 ui::mojom::WindowType window_type, |
112 std::map<std::string, std::vector<uint8_t>>* properties) = 0; | 112 std::map<std::string, std::vector<uint8_t>>* properties) = 0; |
113 | 113 |
114 // Called when a Mus client's jankiness changes. |windows| is the set of | 114 // Called when a Mus client's jankiness changes. |windows| is the set of |
115 // windows owned by the window manager in which the client is embedded. | 115 // windows owned by the window manager in which the client is embedded. |
116 virtual void OnWmClientJankinessChanged( | 116 virtual void OnWmClientJankinessChanged( |
117 const std::set<Window*>& client_windows, | 117 const std::set<Window*>& client_windows, |
118 bool janky) = 0; | 118 bool janky) = 0; |
119 | 119 |
| 120 // Called when a Mus client has started a drag, and wants this image to be |
| 121 // the drag representation. |
| 122 virtual void OnWmBuildDragImage(const gfx::Point& cursor_location, |
| 123 const SkBitmap& drag_image, |
| 124 const gfx::Vector2d& drag_image_offset, |
| 125 ui::mojom::DragEventSource source) = 0; |
| 126 |
| 127 // Called during drags when the drag location has changed and the drag |
| 128 // representation must be moved. |
| 129 virtual void OnWmMoveDragImage(const gfx::Point& cursor_location) = 0; |
| 130 |
| 131 // Called when a drag is complete or canceled, and signals that the drag image |
| 132 // should be removed. |
| 133 virtual void OnWmDestroyDragImage() = 0; |
| 134 |
120 // When a new display is added OnWmWillCreateDisplay() is called, and then | 135 // When a new display is added OnWmWillCreateDisplay() is called, and then |
121 // OnWmNewDisplay(). OnWmWillCreateDisplay() is intended to add the display | 136 // OnWmNewDisplay(). OnWmWillCreateDisplay() is intended to add the display |
122 // to the set of displays (see Screen). | 137 // to the set of displays (see Screen). |
123 virtual void OnWmWillCreateDisplay(const display::Display& display) = 0; | 138 virtual void OnWmWillCreateDisplay(const display::Display& display) = 0; |
124 | 139 |
125 // Called when a WindowTreeHostMus is created for a new display | 140 // Called when a WindowTreeHostMus is created for a new display |
126 // Called when a display is added. |window_tree_host| is the WindowTreeHost | 141 // Called when a display is added. |window_tree_host| is the WindowTreeHost |
127 // for the new display. | 142 // for the new display. |
128 virtual void OnWmNewDisplay( | 143 virtual void OnWmNewDisplay( |
129 std::unique_ptr<WindowTreeHostMus> window_tree_host, | 144 std::unique_ptr<WindowTreeHostMus> window_tree_host, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // window. | 183 // window. |
169 virtual void OnWmDeactivateWindow(Window* window) = 0; | 184 virtual void OnWmDeactivateWindow(Window* window) = 0; |
170 | 185 |
171 protected: | 186 protected: |
172 virtual ~WindowManagerDelegate() {} | 187 virtual ~WindowManagerDelegate() {} |
173 }; | 188 }; |
174 | 189 |
175 } // namespace ui | 190 } // namespace ui |
176 | 191 |
177 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ | 192 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
OLD | NEW |