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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h

Issue 1839223003: Add basic Chrome interaction with the mash shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. 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
(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 CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_MASH_SHELF_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_MASH_SHELF_CONTROLLER_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/memory/scoped_ptr.h"
12 #include "mash/shelf/public/interfaces/shelf.mojom.h"
13 #include "mojo/public/cpp/bindings/associated_binding.h"
14
15 class ChromeShelfItemDelegate;
16
17 // ChromeMashShelfController manages chrome's interaction with the mash shelf.
18 class ChromeMashShelfController : public mash::shelf::mojom::ShelfObserver {
19 public:
20 ~ChromeMashShelfController() override;
21
22 // Creates an instance.
23 static ChromeMashShelfController* CreateInstance();
24
25 // Returns the single ChromeMashShelfController instance.
26 static ChromeMashShelfController* instance() { return instance_; }
27
28 private:
29 ChromeMashShelfController();
30
31 void Init();
32
33 // mash::shelf::mojom::ShelfObserver:
34 void OnAlignmentChanged(mash::shelf::mojom::Alignment alignment) override;
35 void OnAutoHideBehaviorChanged(
36 mash::shelf::mojom::AutoHideBehavior auto_hide) override;
37
38 static ChromeMashShelfController* instance_;
39
40 mash::shelf::mojom::ShelfControllerPtr shelf_controller_;
41 mojo::AssociatedBinding<mash::shelf::mojom::ShelfObserver> observer_binding_;
42 std::map<std::string, scoped_ptr<ChromeShelfItemDelegate>>
43 app_id_to_item_delegate_;
44
45 DISALLOW_COPY_AND_ASSIGN(ChromeMashShelfController);
46 };
47
48 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_MASH_SHELF_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698