| 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 MASH_WM_WINDOW_MANAGER_IMPL_H_ | 5 #ifndef MASH_WM_WINDOW_MANAGER_IMPL_H_ |
| 6 #define MASH_WM_WINDOW_MANAGER_IMPL_H_ | 6 #define MASH_WM_WINDOW_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/mus/common/types.h" | 9 #include "components/mus/common/types.h" |
| 10 #include "components/mus/public/cpp/window_observer.h" | 10 #include "components/mus/public/cpp/window_observer.h" |
| 11 #include "components/mus/public/interfaces/window_manager.mojom.h" | 11 #include "components/mus/public/interfaces/window_manager.mojom.h" |
| 12 | 12 |
| 13 class WindowManagerApplication; | 13 class WindowManagerApplication; |
| 14 | 14 |
| 15 using WindowManagerErrorCodeCallback = | 15 using WindowManagerErrorCodeCallback = |
| 16 const mojo::Callback<void(mus::mojom::WindowManagerErrorCode)>; | 16 const mojo::Callback<void(mus::mojom::WindowManagerErrorCode)>; |
| 17 | 17 |
| 18 class WindowManagerImpl : public mus::mojom::WindowManager, | 18 class WindowManagerImpl : public mus::mojom::WindowManager, |
| 19 public mus::WindowObserver { | 19 public mus::WindowObserver { |
| 20 public: | 20 public: |
| 21 explicit WindowManagerImpl(WindowManagerApplication* state); | 21 explicit WindowManagerImpl(WindowManagerApplication* state); |
| 22 ~WindowManagerImpl() override; | 22 ~WindowManagerImpl() override; |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 gfx::Rect CalculateDefaultBounds(mus::Window* window) const; | 25 gfx::Rect CalculateDefaultBounds(mus::Window* window) const; |
| 26 gfx::Rect GetMaximizedWindowBounds() const; | 26 gfx::Rect GetMaximizedWindowBounds() const; |
| 27 | 27 |
| 28 // mus::mojom::WindowManager: | 28 // mus::mojom::WindowManager: |
| 29 void OpenWindow( | 29 void OpenWindow(mus::mojom::WindowTreeClientPtr client, |
| 30 mus::mojom::WindowTreeClientPtr client, | 30 mojo::Map<mojo::String, mojo::Array<uint8_t>> |
| 31 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override; | 31 transport_properties) override; |
| 32 void GetConfig(const GetConfigCallback& callback) override; | 32 void GetConfig(const GetConfigCallback& callback) override; |
| 33 | 33 |
| 34 mus::Window* GetContainerForChild(mus::Window* child); | 34 mus::Window* GetContainerForChild(mus::Window* child); |
| 35 | 35 |
| 36 WindowManagerApplication* state_; | 36 WindowManagerApplication* state_; |
| 37 | 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl); | 38 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 #endif // MASH_WM_WINDOW_MANAGER_IMPL_H_ | 41 #endif // MASH_WM_WINDOW_MANAGER_IMPL_H_ |
| OLD | NEW |