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

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

Issue 2791803002: mash: Move LauncherItemController to ash, rename ShelfItemDelegate. (Closed)
Patch Set: Sync and rebase. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/launcher_item_controller.h
diff --git a/chrome/browser/ui/ash/launcher/launcher_item_controller.h b/chrome/browser/ui/ash/launcher/launcher_item_controller.h
deleted file mode 100644
index 7b7e3dd65aaeef4dd623e3644f287ccc9b491162..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/ash/launcher/launcher_item_controller.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 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_LAUNCHER_ITEM_CONTROLLER_H_
-#define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_
-
-#include <string>
-
-#include "ash/public/cpp/app_launch_id.h"
-#include "ash/public/cpp/shelf_types.h"
-#include "ash/public/interfaces/shelf.mojom.h"
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "ui/events/event.h"
-
-class AppWindowLauncherItemController;
-class ChromeLauncherController;
-
-using MenuItemList = std::vector<ash::mojom::MenuItemPtr>;
-
-// LauncherItemController is used by ChromeLauncherController to track one
-// or more windows associated with a shelf item.
-class LauncherItemController : public ash::mojom::ShelfItemDelegate {
- public:
- LauncherItemController(const ash::AppLaunchId& app_launch_id,
- ChromeLauncherController* launcher_controller);
- ~LauncherItemController() override;
-
- ash::ShelfID shelf_id() const { return shelf_id_; }
- void set_shelf_id(ash::ShelfID id) { shelf_id_ = id; }
- const ash::AppLaunchId& app_launch_id() const { return app_launch_id_; }
- const std::string& app_id() const { return app_launch_id_.app_id(); }
- const std::string& launch_id() const { return app_launch_id_.launch_id(); }
- ChromeLauncherController* launcher_controller() const {
- return launcher_controller_;
- }
-
- bool image_set_by_controller() const { return image_set_by_controller_; }
- void set_image_set_by_controller(bool image_set_by_controller) {
- image_set_by_controller_ = image_set_by_controller;
- }
-
- // Returns items for the application menu; used for convenience and testing.
- virtual MenuItemList GetAppMenuItems(int event_flags);
-
- // Returns nullptr if class is not AppWindowLauncherItemController.
- virtual AppWindowLauncherItemController* AsAppWindowLauncherItemController();
-
- private:
- // The app launch id; empty if there is no app associated with the item.
- // Besides the application id, AppLaunchId also contains a launch id, which is
- // an id that can be passed to an app when launched in order to support
- // multiple shelf items per app. This id is used together with the app_id to
- // uniquely identify each shelf item that has the same app_id.
- const ash::AppLaunchId app_launch_id_;
-
- // A unique id assigned by the shelf model for the shelf item.
- ash::ShelfID shelf_id_;
-
- ChromeLauncherController* launcher_controller_;
-
- // Set to true if the launcher item image has been set by the controller.
- bool image_set_by_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(LauncherItemController);
-};
-
-#endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | chrome/browser/ui/ash/launcher/launcher_item_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698