Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: ash/mus/shelf_delegate_mus.h

Issue 1835403002: Support additional mash shelf alignments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "ash/shelf/shelf_types.h"
12 #include "mash/wm/public/interfaces/shelf_layout.mojom.h"
11 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" 13 #include "mash/wm/public/interfaces/user_window_controller.mojom.h"
12 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
13 15
14 namespace ash { 16 namespace ash {
15 17
16 class ShelfModel; 18 class ShelfModel;
17 19
18 namespace sysui { 20 namespace sysui {
19 21
20 class ShelfDelegateMus : public ShelfDelegate, 22 class ShelfDelegateMus : public ShelfDelegate,
21 public mash::wm::mojom::UserWindowObserver { 23 public mash::wm::mojom::UserWindowObserver {
22 public: 24 public:
23 explicit ShelfDelegateMus(ShelfModel* model); 25 explicit ShelfDelegateMus(ShelfModel* model);
24 ~ShelfDelegateMus() override; 26 ~ShelfDelegateMus() override;
25 27
26 private: 28 private:
27 // ShelfDelegate: 29 // ShelfDelegate:
28 void OnShelfCreated(Shelf* shelf) override; 30 void OnShelfCreated(Shelf* shelf) override;
29 void OnShelfDestroyed(Shelf* shelf) override; 31 void OnShelfDestroyed(Shelf* shelf) override;
32 void OnAlignmentChanged(ShelfAlignment alignment) override;
33 void OnAutoHideBehaviorChanged(ShelfAutoHideBehavior auto_hide) override;
30 ShelfID GetShelfIDForAppID(const std::string& app_id) override; 34 ShelfID GetShelfIDForAppID(const std::string& app_id) override;
31 bool HasShelfIDToAppIDMapping(ShelfID id) const override; 35 bool HasShelfIDToAppIDMapping(ShelfID id) const override;
32 const std::string& GetAppIDForShelfID(ShelfID id) override; 36 const std::string& GetAppIDForShelfID(ShelfID id) override;
33 void PinAppWithID(const std::string& app_id) override; 37 void PinAppWithID(const std::string& app_id) override;
34 bool IsAppPinned(const std::string& app_id) override; 38 bool IsAppPinned(const std::string& app_id) override;
35 void UnpinAppWithID(const std::string& app_id) override; 39 void UnpinAppWithID(const std::string& app_id) override;
36 40
37 // mash::wm::mojom::UserWindowObserver: 41 // mash::wm::mojom::UserWindowObserver:
38 void OnUserWindowObserverAdded( 42 void OnUserWindowObserverAdded(
39 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override; 43 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override;
40 void OnUserWindowAdded(mash::wm::mojom::UserWindowPtr user_window) override; 44 void OnUserWindowAdded(mash::wm::mojom::UserWindowPtr user_window) override;
41 void OnUserWindowRemoved(uint32_t window_id) override; 45 void OnUserWindowRemoved(uint32_t window_id) override;
42 void OnUserWindowTitleChanged(uint32_t window_id, 46 void OnUserWindowTitleChanged(uint32_t window_id,
43 const mojo::String& window_title) override; 47 const mojo::String& window_title) override;
44 void OnUserWindowFocusChanged(uint32_t window_id, bool has_focus) override; 48 void OnUserWindowFocusChanged(uint32_t window_id, bool has_focus) override;
45 49
46 ShelfModel* model_; 50 ShelfModel* model_;
51 Shelf* shelf_;
47 52
53 mash::wm::mojom::ShelfLayoutPtr shelf_layout_;
48 mash::wm::mojom::UserWindowControllerPtr user_window_controller_; 54 mash::wm::mojom::UserWindowControllerPtr user_window_controller_;
49 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_; 55 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_;
50 std::map<uint32_t, ShelfID> window_id_to_shelf_id_; 56 std::map<uint32_t, ShelfID> window_id_to_shelf_id_;
51 57
52 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus); 58 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus);
53 }; 59 };
54 60
55 } // namespace sysui 61 } // namespace sysui
56 } // namespace ash 62 } // namespace ash
57 63
58 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_ 64 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_
OLDNEW
« no previous file with comments | « no previous file | ash/mus/shelf_delegate_mus.cc » ('j') | mash/wm/public/interfaces/shelf_layout.mojom » ('J')

Powered by Google App Engine
This is Rietveld 408576698