| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Used by clients implementing a window manager. | 73 // Used by clients implementing a window manager. |
| 74 // TODO(sky): this should be called WindowManager, but that's rather confusing | 74 // TODO(sky): this should be called WindowManager, but that's rather confusing |
| 75 // currently. | 75 // currently. |
| 76 class AURA_EXPORT WindowManagerDelegate { | 76 class AURA_EXPORT WindowManagerDelegate { |
| 77 public: | 77 public: |
| 78 // Called once to give the delegate access to functions only exposed to | 78 // Called once to give the delegate access to functions only exposed to |
| 79 // the WindowManager. | 79 // the WindowManager. |
| 80 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0; | 80 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0; |
| 81 | 81 |
| 82 // Called when the connection to mus has been fully established. |
| 83 virtual void OnWmConnected(); |
| 84 |
| 82 // A client requested the bounds of |window| to change to |bounds|. | 85 // A client requested the bounds of |window| to change to |bounds|. |
| 83 virtual void OnWmSetBounds(Window* window, const gfx::Rect& bounds) = 0; | 86 virtual void OnWmSetBounds(Window* window, const gfx::Rect& bounds) = 0; |
| 84 | 87 |
| 85 // A client requested the shared property named |name| to change to | 88 // A client requested the shared property named |name| to change to |
| 86 // |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 |
| 87 // otherwise. If true is returned the property is set via | 90 // otherwise. If true is returned the property is set via |
| 88 // PropertyConverter::SetPropertyFromTransportValue(). | 91 // PropertyConverter::SetPropertyFromTransportValue(). |
| 89 virtual bool OnWmSetProperty( | 92 virtual bool OnWmSetProperty( |
| 90 Window* window, | 93 Window* window, |
| 91 const std::string& name, | 94 const std::string& name, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // window. | 185 // window. |
| 183 virtual void OnWmDeactivateWindow(Window* window) = 0; | 186 virtual void OnWmDeactivateWindow(Window* window) = 0; |
| 184 | 187 |
| 185 protected: | 188 protected: |
| 186 virtual ~WindowManagerDelegate() {} | 189 virtual ~WindowManagerDelegate() {} |
| 187 }; | 190 }; |
| 188 | 191 |
| 189 } // namespace ui | 192 } // namespace ui |
| 190 | 193 |
| 191 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ | 194 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
| OLD | NEW |