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

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

Issue 1684633002: ash/mash: Introduce a ShelfDelegate implementation for mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ash-sysui-window-container
Patch Set: tot-merge Created 4 years, 10 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
« no previous file with comments | « ash/mus/BUILD.gn ('k') | ash/mus/shelf_delegate_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_MUS_SHELF_DELEGATE_MUS_H_
6 #define ASH_MUS_SHELF_DELEGATE_MUS_H_
7
8 #include <map>
9
10 #include "ash/shelf/shelf_delegate.h"
11 #include "mash/wm/public/interfaces/user_window_controller.mojom.h"
12 #include "mojo/public/cpp/bindings/binding.h"
13
14 namespace ash {
15
16 class ShelfModel;
17
18 namespace sysui {
19
20 class ShelfDelegateMus : public ShelfDelegate,
21 public mash::wm::mojom::UserWindowObserver {
22 public:
23 explicit ShelfDelegateMus(ShelfModel* model);
24 ~ShelfDelegateMus() override;
25
26 private:
27 // ShelfDelegate:
28 void OnShelfCreated(Shelf* shelf) override;
29 void OnShelfDestroyed(Shelf* shelf) override;
30 ShelfID GetShelfIDForAppID(const std::string& app_id) override;
31 bool HasShelfIDToAppIDMapping(ShelfID id) const override;
32 const std::string& GetAppIDForShelfID(ShelfID id) override;
33 void PinAppWithID(const std::string& app_id) override;
34 bool IsAppPinned(const std::string& app_id) override;
35 void UnpinAppWithID(const std::string& app_id) override;
36
37 // mash::wm::mojom::UserWindowObserver:
38 void OnUserWindowObserverAdded(
39 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override;
40 void OnUserWindowAdded(mash::wm::mojom::UserWindowPtr user_window) override;
41 void OnUserWindowRemoved(uint32_t window_id) override;
42 void OnUserWindowTitleChanged(uint32_t window_id,
43 const mojo::String& window_title) override;
44 void OnUserWindowFocusChanged(uint32_t window_id, bool has_focus) override;
45
46 ShelfModel* model_;
47
48 mash::wm::mojom::UserWindowControllerPtr user_window_controller_;
49 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_;
50 std::map<uint32_t, ShelfID> window_id_to_shelf_id_;
51
52 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus);
53 };
54
55 } // namespace sysui
56 } // namespace ash
57
58 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_
OLDNEW
« no previous file with comments | « ash/mus/BUILD.gn ('k') | ash/mus/shelf_delegate_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698