OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ASH_MUS_SHELF_DELEGATE_MUS_H_ | 5 #ifndef ASH_MUS_SHELF_DELEGATE_MUS_H_ |
6 #define ASH_MUS_SHELF_DELEGATE_MUS_H_ | 6 #define ASH_MUS_SHELF_DELEGATE_MUS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "ash/shelf/shelf_delegate.h" | 10 #include "ash/shelf/shelf_delegate.h" |
| 11 #include "mash/wm/public/interfaces/shelf_layout.mojom.h" |
11 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" | 12 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" |
12 #include "mojo/public/cpp/bindings/binding.h" | 13 #include "mojo/public/cpp/bindings/binding.h" |
13 | 14 |
14 namespace ash { | 15 namespace ash { |
15 | 16 |
16 class ShelfModel; | 17 class ShelfModel; |
17 | 18 |
18 namespace sysui { | 19 namespace sysui { |
19 | 20 |
20 class ShelfDelegateMus : public ShelfDelegate, | 21 class ShelfDelegateMus : public ShelfDelegate, |
(...skipping 19 matching lines...) Expand all Loading... |
40 void OnUserWindowObserverAdded( | 41 void OnUserWindowObserverAdded( |
41 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override; | 42 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override; |
42 void OnUserWindowAdded(mash::wm::mojom::UserWindowPtr user_window) override; | 43 void OnUserWindowAdded(mash::wm::mojom::UserWindowPtr user_window) override; |
43 void OnUserWindowRemoved(uint32_t window_id) override; | 44 void OnUserWindowRemoved(uint32_t window_id) override; |
44 void OnUserWindowTitleChanged(uint32_t window_id, | 45 void OnUserWindowTitleChanged(uint32_t window_id, |
45 const mojo::String& window_title) override; | 46 const mojo::String& window_title) override; |
46 void OnUserWindowAppIconChanged(uint32_t window_id, | 47 void OnUserWindowAppIconChanged(uint32_t window_id, |
47 mojo::Array<uint8_t> app_icon) override; | 48 mojo::Array<uint8_t> app_icon) override; |
48 void OnUserWindowFocusChanged(uint32_t window_id, bool has_focus) override; | 49 void OnUserWindowFocusChanged(uint32_t window_id, bool has_focus) override; |
49 | 50 |
| 51 // Set the Mus window preferred sizes, needed by mash::wm::ShelfLayout. |
| 52 void SetShelfPreferredSizes(Shelf* shelf); |
| 53 |
50 ShelfModel* model_; | 54 ShelfModel* model_; |
51 | 55 |
| 56 mash::wm::mojom::ShelfLayoutPtr shelf_layout_; |
52 mash::wm::mojom::UserWindowControllerPtr user_window_controller_; | 57 mash::wm::mojom::UserWindowControllerPtr user_window_controller_; |
53 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_; | 58 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_; |
54 std::map<uint32_t, ShelfID> window_id_to_shelf_id_; | 59 std::map<uint32_t, ShelfID> window_id_to_shelf_id_; |
55 | 60 |
56 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus); | 61 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus); |
57 }; | 62 }; |
58 | 63 |
59 } // namespace sysui | 64 } // namespace sysui |
60 } // namespace ash | 65 } // namespace ash |
61 | 66 |
62 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_ | 67 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_ |
OLD | NEW |