| Index: chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h
|
| diff --git a/chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h b/chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4b55fa7880b249cc2522d93745484da482952382
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h
|
| @@ -0,0 +1,49 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_MASH_SHELF_CONTROLLER_H_
|
| +#define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_MASH_SHELF_CONTROLLER_H_
|
| +
|
| +#include "mash/shelf/public/interfaces/shelf.mojom.h"
|
| +#include "mojo/public/cpp/bindings/binding.h"
|
| +
|
| +// ChromeMashShelfController manages chrome's interaction with the mash shelf.
|
| +class ChromeMashShelfController : public mash::shelf::mojom::ShelfObserver,
|
| + public mash::shelf::mojom::ShelfItemDelegate {
|
| + public:
|
| + ~ChromeMashShelfController() override;
|
| +
|
| + // Creates an instance.
|
| + static ChromeMashShelfController* CreateInstance();
|
| +
|
| + // Returns the single ChromeMashShelfController instance.
|
| + static ChromeMashShelfController* instance() { return instance_; }
|
| +
|
| + private:
|
| + ChromeMashShelfController();
|
| +
|
| + void Init();
|
| +
|
| + // mash::shelf::mojom::ShelfObserver:
|
| + void OnAlignmentChanged(mash::shelf::mojom::Alignment alignment) override;
|
| + void OnAutoHideBehaviorChanged(
|
| + mash::shelf::mojom::AutoHideBehavior auto_hide) override;
|
| +
|
| + // mash::shelf::mojom::ShelfItemDelegate:
|
| + void ExecuteCommand(const mojo::String& id,
|
| + uint32_t command_id,
|
| + int32_t event_flags) override;
|
| + void ItemRemoved(const mojo::String& id) override;
|
| + void ItemReordered(const mojo::String& id, uint32_t order) override;
|
| +
|
| + static ChromeMashShelfController* instance_;
|
| +
|
| + mash::shelf::mojom::ShelfPtr shelf_;
|
| + mojo::Binding<mash::shelf::mojom::ShelfObserver> observer_binding_;
|
| + mojo::Binding<mash::shelf::mojom::ShelfItemDelegate> item_delegate_binding_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ChromeMashShelfController);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_MASH_SHELF_CONTROLLER_H_
|
|
|