| 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 | 87 |
| 88 // A client requested the shared property named |name| to change to | 88 // A client requested the shared property named |name| to change to |
| 89 // |new_data|. Return true to allow the change to |new_data|, false | 89 // |new_data|. Return true to allow the change to |new_data|, false |
| 90 // otherwise. If true is returned the property is set via | 90 // otherwise. If true is returned the property is set via |
| 91 // PropertyConverter::SetPropertyFromTransportValue(). | 91 // PropertyConverter::SetPropertyFromTransportValue(). |
| 92 virtual bool OnWmSetProperty( | 92 virtual bool OnWmSetProperty( |
| 93 Window* window, | 93 Window* window, |
| 94 const std::string& name, | 94 const std::string& name, |
| 95 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; | 95 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; |
| 96 | 96 |
| 97 // A client requested to change focusibility of |window|. We currently assume |
| 98 // this always succeeds. |
| 99 virtual void OnWmSetCanFocus(Window* window, bool can_focus) = 0; |
| 100 |
| 97 // A client has requested a new top level window. The delegate should create | 101 // A client has requested a new top level window. The delegate should create |
| 98 // and parent the window appropriately and return it. |properties| is the | 102 // and parent the window appropriately and return it. |properties| is the |
| 99 // supplied properties from the client requesting the new window. The | 103 // supplied properties from the client requesting the new window. The |
| 100 // delegate may modify |properties| before calling NewWindow(), but the | 104 // delegate may modify |properties| before calling NewWindow(), but the |
| 101 // delegate does *not* own |properties|, they are valid only for the life | 105 // delegate does *not* own |properties|, they are valid only for the life |
| 102 // of OnWmCreateTopLevelWindow(). |window_type| is the type of window | 106 // of OnWmCreateTopLevelWindow(). |window_type| is the type of window |
| 103 // requested by the client. Use SetWindowType() with |window_type| (in | 107 // requested by the client. Use SetWindowType() with |window_type| (in |
| 104 // property_utils.h) to configure the type on the newly created window. | 108 // property_utils.h) to configure the type on the newly created window. |
| 105 virtual Window* OnWmCreateTopLevelWindow( | 109 virtual Window* OnWmCreateTopLevelWindow( |
| 106 ui::mojom::WindowType window_type, | 110 ui::mojom::WindowType window_type, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // window. | 159 // window. |
| 156 virtual void OnWmDeactivateWindow(Window* window) = 0; | 160 virtual void OnWmDeactivateWindow(Window* window) = 0; |
| 157 | 161 |
| 158 protected: | 162 protected: |
| 159 virtual ~WindowManagerDelegate() {} | 163 virtual ~WindowManagerDelegate() {} |
| 160 }; | 164 }; |
| 161 | 165 |
| 162 } // namespace ui | 166 } // namespace ui |
| 163 | 167 |
| 164 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ | 168 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
| OLD | NEW |