| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace ui { | 33 namespace ui { |
| 34 class Event; | 34 class Event; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace aura { | 37 namespace aura { |
| 38 | 38 |
| 39 class Window; | 39 class Window; |
| 40 class WindowTreeHostMus; | 40 class WindowTreeHostMus; |
| 41 | 41 |
| 42 struct WindowTreeHostMusInitParams; |
| 43 |
| 42 // See the mojom with the same name for details on the functions in this | 44 // See the mojom with the same name for details on the functions in this |
| 43 // interface. | 45 // interface. |
| 44 class AURA_EXPORT WindowManagerClient { | 46 class AURA_EXPORT WindowManagerClient { |
| 45 public: | 47 public: |
| 46 virtual void SetFrameDecorationValues( | 48 virtual void SetFrameDecorationValues( |
| 47 ui::mojom::FrameDecorationValuesPtr values) = 0; | 49 ui::mojom::FrameDecorationValuesPtr values) = 0; |
| 48 virtual void SetNonClientCursor(Window* window, | 50 virtual void SetNonClientCursor(Window* window, |
| 49 ui::mojom::CursorType non_client_cursor) = 0; | 51 ui::mojom::CursorType non_client_cursor) = 0; |
| 50 | 52 |
| 51 virtual void AddAccelerators( | 53 virtual void AddAccelerators( |
| 52 std::vector<ui::mojom::WmAcceleratorPtr> accelerators, | 54 std::vector<ui::mojom::WmAcceleratorPtr> accelerators, |
| 53 const base::Callback<void(bool)>& callback) = 0; | 55 const base::Callback<void(bool)>& callback) = 0; |
| 54 virtual void RemoveAccelerator(uint32_t id) = 0; | 56 virtual void RemoveAccelerator(uint32_t id) = 0; |
| 55 virtual void AddActivationParent(Window* window) = 0; | 57 virtual void AddActivationParent(Window* window) = 0; |
| 56 virtual void RemoveActivationParent(Window* window) = 0; | 58 virtual void RemoveActivationParent(Window* window) = 0; |
| 57 virtual void ActivateNextWindow() = 0; | 59 virtual void ActivateNextWindow() = 0; |
| 58 virtual void SetExtendedHitArea(Window* window, | 60 virtual void SetExtendedHitArea(Window* window, |
| 59 const gfx::Insets& hit_area) = 0; | 61 const gfx::Insets& hit_area) = 0; |
| 60 | 62 |
| 61 // Requests the client embedded in |window| to close the window. Only | 63 // Requests the client embedded in |window| to close the window. Only |
| 62 // applicable to top-level windows. If a client is not embedded in |window|, | 64 // applicable to top-level windows. If a client is not embedded in |window|, |
| 63 // this does nothing. | 65 // this does nothing. |
| 64 virtual void RequestClose(Window* window) = 0; | 66 virtual void RequestClose(Window* window) = 0; |
| 65 | 67 |
| 66 // Blocks until the initial displays have been received. | 68 // Blocks until the initial displays have been received. |
| 67 virtual bool WaitForInitialDisplays() = 0; | 69 virtual bool WaitForInitialDisplays() = 0; |
| 68 | 70 |
| 71 // Used by the window manager to create a new display. This is only useful if |
| 72 // the WindowTreeClient was configured not to automatically create displays |
| 73 // (see ConnectAsWindowManager()). The caller needs to configure |
| 74 // DisplayInitParams on the returned object. |
| 75 virtual WindowTreeHostMusInitParams CreateInitParamsForNewDisplay() = 0; |
| 76 |
| 69 protected: | 77 protected: |
| 70 virtual ~WindowManagerClient() {} | 78 virtual ~WindowManagerClient() {} |
| 71 }; | 79 }; |
| 72 | 80 |
| 73 // Used by clients implementing a window manager. | 81 // Used by clients implementing a window manager. |
| 74 // TODO(sky): this should be called WindowManager, but that's rather confusing | 82 // TODO(sky): this should be called WindowManager, but that's rather confusing |
| 75 // currently. | 83 // currently. |
| 76 class AURA_EXPORT WindowManagerDelegate { | 84 class AURA_EXPORT WindowManagerDelegate { |
| 77 public: | 85 public: |
| 78 // Called once to give the delegate access to functions only exposed to | 86 // Called once to give the delegate access to functions only exposed to |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // window. | 193 // window. |
| 186 virtual void OnWmDeactivateWindow(Window* window) = 0; | 194 virtual void OnWmDeactivateWindow(Window* window) = 0; |
| 187 | 195 |
| 188 protected: | 196 protected: |
| 189 virtual ~WindowManagerDelegate() {} | 197 virtual ~WindowManagerDelegate() {} |
| 190 }; | 198 }; |
| 191 | 199 |
| 192 } // namespace ui | 200 } // namespace ui |
| 193 | 201 |
| 194 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ | 202 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ |
| OLD | NEW |