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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address comments. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
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
deleted file mode 100644
index 748f9b425b90a7772ae3d86f9fb7957bb6db5b69..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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 <map>
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "ash/public/interfaces/shelf.mojom.h"
-#include "chrome/browser/ui/app_icon_loader.h"
-#include "chrome/browser/ui/ash/launcher/launcher_controller_helper.h"
-#include "mojo/public/cpp/bindings/associated_binding.h"
-
-class ChromeShelfItemDelegate;
-
-// ChromeMashShelfController manages chrome's interaction with the mash shelf.
-class ChromeMashShelfController : public ash::mojom::ShelfObserver,
- public AppIconLoaderDelegate {
- public:
- ChromeMashShelfController();
- ~ChromeMashShelfController() override;
-
- void LaunchItem(const std::string& app_id);
-
- private:
- void Init();
-
- void PinAppsFromPrefs();
-
- AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id);
-
- // ash::mojom::ShelfObserver:
- void OnShelfCreated(int64_t display_id) override;
- void OnAlignmentChanged(ash::ShelfAlignment alignment,
- int64_t display_id) override;
- void OnAutoHideBehaviorChanged(ash::ShelfAutoHideBehavior auto_hide,
- int64_t display_id) override;
-
- // AppIconLoaderDelegate:
- void OnAppImageUpdated(const std::string& app_id,
- const gfx::ImageSkia& image) override;
-
- LauncherControllerHelper helper_;
- ash::mojom::ShelfControllerPtr shelf_controller_;
- mojo::AssociatedBinding<ash::mojom::ShelfObserver> observer_binding_;
- std::map<std::string, std::unique_ptr<ChromeShelfItemDelegate>>
- app_id_to_item_delegate_;
-
- // Used to load the images for app items.
- std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeMashShelfController);
-};
-
-#endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_MASH_SHELF_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698