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

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

Issue 1823923002: arc: Support running Arc app in shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased + few nits Created 4 years, 9 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/extension_app_window_launcher_item_controller.h
diff --git a/chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..472ad2694602f9954eaa60c5b22c39bd4b630bfd
--- /dev/null
+++ b/chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.h
@@ -0,0 +1,55 @@
+// 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_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
+#define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
+
+#include <map>
+#include <string>
+
+#include "base/macros.h"
+#include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h"
+
+namespace extensions {
+class AppWindow;
+}
+
+class ChromeLauncherController;
+
+class ExtensionAppWindowLauncherItemController
+ : public AppWindowLauncherItemController {
+ public:
+ ExtensionAppWindowLauncherItemController(
+ Type type,
+ const std::string& app_shelf_id,
+ const std::string& app_id,
+ ChromeLauncherController* controller);
+
+ ~ExtensionAppWindowLauncherItemController() override;
+
+ void AddAppWindow(extensions::AppWindow* app_window);
+
+ // LauncherItemController overrides:
+ ChromeLauncherAppMenuItems GetApplicationList(int event_flags) override;
+ ash::ShelfItemDelegate::PerformedAction ItemSelected(
+ const ui::Event& event) override;
+ base::string16 GetTitle() override;
+ ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) override;
+ bool IsDraggable() override;
+ bool ShouldShowTooltip() override;
+
+ protected:
+ // AppWindowLauncherItemController:
+ void OnWindowRemoved(ui::BaseWindow* window) override;
+
+ private:
+ using WindowToAppWindow =
+ std::map<const ui::BaseWindow*, extensions::AppWindow*>;
+
+ WindowToAppWindow window_to_app_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionAppWindowLauncherItemController);
+};
+
+#endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698