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

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: Move chrome_launcher_prefs from ash to aura. 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 "mash/shelf/public/interfaces/shelf.mojom.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10
11 // ChromeMashShelfController manages chrome's interaction with the mash shelf.
12 class ChromeMashShelfController : public mash::shelf::mojom::ShelfObserver,
13 public mash::shelf::mojom::ShelfItemDelegate {
14 public:
15 ~ChromeMashShelfController() override;
16
17 // Creates an instance.
18 static ChromeMashShelfController* CreateInstance();
19
20 // Returns the single ChromeMashShelfController instance.
21 static ChromeMashShelfController* instance() { return instance_; }
22
23 private:
24 ChromeMashShelfController();
25
26 void Init();
27
28 // mash::shelf::mojom::ShelfObserver:
29 void OnAlignmentChanged(mash::shelf::mojom::Alignment alignment) override;
30 void OnAutoHideBehaviorChanged(
31 mash::shelf::mojom::AutoHideBehavior auto_hide) override;
32
33 // mash::shelf::mojom::ShelfItemDelegate:
34 void ExecuteCommand(const mojo::String& id,
35 uint32_t command_id,
36 int32_t event_flags) override;
37 void ItemRemoved(const mojo::String& id) override;
38 void ItemReordered(const mojo::String& id, uint32_t order) override;
39
40 static ChromeMashShelfController* instance_;
41
42 mash::shelf::mojom::ShelfPtr shelf_;
43 mojo::Binding<mash::shelf::mojom::ShelfObserver> observer_binding_;
44 mojo::Binding<mash::shelf::mojom::ShelfItemDelegate> item_delegate_binding_;
45
46 DISALLOW_COPY_AND_ASSIGN(ChromeMashShelfController);
47 };
48
49 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_MASH_SHELF_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698