| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 virtual bool OnWmSetProperty( | 87 virtual bool OnWmSetProperty( |
| 88 Window* window, | 88 Window* window, |
| 89 const std::string& name, | 89 const std::string& name, |
| 90 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; | 90 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; |
| 91 | 91 |
| 92 // A client has requested a new top level window. The delegate should create | 92 // A client has requested a new top level window. The delegate should create |
| 93 // and parent the window appropriately and return it. |properties| is the | 93 // and parent the window appropriately and return it. |properties| is the |
| 94 // supplied properties from the client requesting the new window. The | 94 // supplied properties from the client requesting the new window. The |
| 95 // delegate may modify |properties| before calling NewWindow(), but the | 95 // delegate may modify |properties| before calling NewWindow(), but the |
| 96 // delegate does *not* own |properties|, they are valid only for the life | 96 // delegate does *not* own |properties|, they are valid only for the life |
| 97 // of OnWmCreateTopLevelWindow(). | 97 // of OnWmCreateTopLevelWindow(). |window_type| is the type of window |
| 98 // requested by the client. Use SetWindowType() with |window_type| (in |
| 99 // property_utils.h) to configure the type on the newly created window. |
| 98 virtual Window* OnWmCreateTopLevelWindow( | 100 virtual Window* OnWmCreateTopLevelWindow( |
| 101 ui::mojom::WindowType window_type, |
| 99 std::map<std::string, std::vector<uint8_t>>* properties) = 0; | 102 std::map<std::string, std::vector<uint8_t>>* properties) = 0; |
| 100 | 103 |
| 101 // Called when a Mus client's jankiness changes. |windows| is the set of | 104 // Called when a Mus client's jankiness changes. |windows| is the set of |
| 102 // windows owned by the window manager in which the client is embedded. | 105 // windows owned by the window manager in which the client is embedded. |
| 103 virtual void OnWmClientJankinessChanged( | 106 virtual void OnWmClientJankinessChanged( |
| 104 const std::set<Window*>& client_windows, | 107 const std::set<Window*>& client_windows, |
| 105 bool janky) = 0; | 108 bool janky) = 0; |
| 106 | 109 |
| 107 // Called when a display is added. |window_tree_host| is the WindowTreeHost | 110 // Called when a display is added. |window_tree_host| is the WindowTreeHost |
| 108 // for the new display. | 111 // for the new display. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 127 | 130 |
| 128 virtual void OnWmCancelMoveLoop(Window* window) = 0; | 131 virtual void OnWmCancelMoveLoop(Window* window) = 0; |
| 129 | 132 |
| 130 protected: | 133 protected: |
| 131 virtual ~WindowManagerDelegate() {} | 134 virtual ~WindowManagerDelegate() {} |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 } // namespace ui | 137 } // namespace ui |
| 135 | 138 |
| 136 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ | 139 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
| OLD | NEW |