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/shelf/public/interfaces/shelf.mojom.h" | 11 #include "mash/shelf/public/interfaces/shelf.mojom.h" |
| 12 #include "mash/wm/public/interfaces/shelf_layout.mojom.h" |
12 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" | 13 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" |
13 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" |
14 #include "mojo/public/cpp/bindings/interface_ptr_set.h" | 15 #include "mojo/public/cpp/bindings/interface_ptr_set.h" |
15 | 16 |
16 namespace ash { | 17 namespace ash { |
17 | 18 |
18 class ShelfModel; | 19 class ShelfModel; |
19 | 20 |
20 namespace sysui { | 21 namespace sysui { |
21 | 22 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void OnUserWindowObserverAdded( | 55 void OnUserWindowObserverAdded( |
55 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override; | 56 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override; |
56 void OnUserWindowAdded(mash::wm::mojom::UserWindowPtr user_window) override; | 57 void OnUserWindowAdded(mash::wm::mojom::UserWindowPtr user_window) override; |
57 void OnUserWindowRemoved(uint32_t window_id) override; | 58 void OnUserWindowRemoved(uint32_t window_id) override; |
58 void OnUserWindowTitleChanged(uint32_t window_id, | 59 void OnUserWindowTitleChanged(uint32_t window_id, |
59 const mojo::String& window_title) override; | 60 const mojo::String& window_title) override; |
60 void OnUserWindowAppIconChanged(uint32_t window_id, | 61 void OnUserWindowAppIconChanged(uint32_t window_id, |
61 mojo::Array<uint8_t> app_icon) override; | 62 mojo::Array<uint8_t> app_icon) override; |
62 void OnUserWindowFocusChanged(uint32_t window_id, bool has_focus) override; | 63 void OnUserWindowFocusChanged(uint32_t window_id, bool has_focus) override; |
63 | 64 |
| 65 // Set the Mus window preferred sizes, needed by mash::wm::ShelfLayout. |
| 66 void SetShelfPreferredSizes(Shelf* shelf); |
| 67 |
64 ShelfModel* model_; | 68 ShelfModel* model_; |
65 | 69 |
66 mojo::AssociatedInterfacePtrSet<mash::shelf::mojom::ShelfObserver> observers_; | 70 mojo::AssociatedInterfacePtrSet<mash::shelf::mojom::ShelfObserver> observers_; |
67 | 71 |
| 72 mash::wm::mojom::ShelfLayoutPtr shelf_layout_; |
68 mash::wm::mojom::UserWindowControllerPtr user_window_controller_; | 73 mash::wm::mojom::UserWindowControllerPtr user_window_controller_; |
69 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_; | 74 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_; |
70 std::map<uint32_t, ShelfID> window_id_to_shelf_id_; | 75 std::map<uint32_t, ShelfID> window_id_to_shelf_id_; |
71 | 76 |
72 std::map<std::string, ShelfID> app_id_to_shelf_id_; | 77 std::map<std::string, ShelfID> app_id_to_shelf_id_; |
73 | 78 |
74 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus); | 79 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus); |
75 }; | 80 }; |
76 | 81 |
77 } // namespace sysui | 82 } // namespace sysui |
78 } // namespace ash | 83 } // namespace ash |
79 | 84 |
80 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_ | 85 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_ |
OLD | NEW |