| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 public: | 76 public: |
| 77 // Called once to give the delegate access to functions only exposed to | 77 // Called once to give the delegate access to functions only exposed to |
| 78 // the WindowManager. | 78 // the WindowManager. |
| 79 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0; | 79 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0; |
| 80 | 80 |
| 81 // A client requested the bounds of |window| to change to |bounds|. Return | 81 // A client requested the bounds of |window| to change to |bounds|. Return |
| 82 // true if the bounds are allowed to change. A return value of false | 82 // true if the bounds are allowed to change. A return value of false |
| 83 // indicates the change is not allowed. | 83 // indicates the change is not allowed. |
| 84 // NOTE: This should not change the bounds of |window|. Instead return the | 84 // NOTE: This should not change the bounds of |window|. Instead return the |
| 85 // bounds the window should be in |bounds|. | 85 // bounds the window should be in |bounds|. |
| 86 virtual bool OnWmSetBounds(Window* window, gfx::Rect* bounds) = 0; | 86 virtual void OnWmSetBounds(Window* window, const gfx::Rect& bounds) = 0; |
| 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 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 const gfx::Insets& insets, | 148 const gfx::Insets& insets, |
| 149 const std::vector<gfx::Rect>& additional_client_areas) = 0; | 149 const std::vector<gfx::Rect>& additional_client_areas) = 0; |
| 150 | 150 |
| 151 protected: | 151 protected: |
| 152 virtual ~WindowManagerDelegate() {} | 152 virtual ~WindowManagerDelegate() {} |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 } // namespace ui | 155 } // namespace ui |
| 156 | 156 |
| 157 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ | 157 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
| OLD | NEW |