| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // A client requested the shared property named |name| to change to | 85 // A client requested the shared property named |name| to change to |
| 86 // |new_data|. Return true to allow the change to |new_data|, false | 86 // |new_data|. Return true to allow the change to |new_data|, false |
| 87 // otherwise. If true is returned the property is set via | 87 // otherwise. If true is returned the property is set via |
| 88 // PropertyConverter::SetPropertyFromTransportValue(). | 88 // PropertyConverter::SetPropertyFromTransportValue(). |
| 89 virtual bool OnWmSetProperty( | 89 virtual bool OnWmSetProperty( |
| 90 Window* window, | 90 Window* window, |
| 91 const std::string& name, | 91 const std::string& name, |
| 92 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; | 92 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; |
| 93 | 93 |
| 94 // A client requested the modal type to be changed to |type|. |
| 95 virtual void OnWmSetModalType(Window* window, ui::ModalType type) = 0; |
| 96 |
| 94 // A client requested to change focusibility of |window|. We currently assume | 97 // A client requested to change focusibility of |window|. We currently assume |
| 95 // this always succeeds. | 98 // this always succeeds. |
| 96 virtual void OnWmSetCanFocus(Window* window, bool can_focus) = 0; | 99 virtual void OnWmSetCanFocus(Window* window, bool can_focus) = 0; |
| 97 | 100 |
| 98 // 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 |
| 99 // and parent the window appropriately and return it. |properties| is the | 102 // and parent the window appropriately and return it. |properties| is the |
| 100 // supplied properties from the client requesting the new window. The | 103 // supplied properties from the client requesting the new window. The |
| 101 // delegate may modify |properties| before calling NewWindow(), but the | 104 // delegate may modify |properties| before calling NewWindow(), but the |
| 102 // 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 |
| 103 // of OnWmCreateTopLevelWindow(). |window_type| is the type of window | 106 // of OnWmCreateTopLevelWindow(). |window_type| is the type of window |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // window. | 159 // window. |
| 157 virtual void OnWmDeactivateWindow(Window* window) = 0; | 160 virtual void OnWmDeactivateWindow(Window* window) = 0; |
| 158 | 161 |
| 159 protected: | 162 protected: |
| 160 virtual ~WindowManagerDelegate() {} | 163 virtual ~WindowManagerDelegate() {} |
| 161 }; | 164 }; |
| 162 | 165 |
| 163 } // namespace ui | 166 } // namespace ui |
| 164 | 167 |
| 165 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ | 168 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
| OLD | NEW |