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

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

Issue 2290603002: Enhance chrome.app.window API for shelf integration with pinning support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LauncherItemController Unit Tests Fix after Rebase Created 4 years, 3 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/app_window_launcher_item_controller.h
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
index 28d976ceddcf091e239beb4736390fc769596828..b024dd806ac326b16279afbcce1f876a0c67371f 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
@@ -42,7 +42,8 @@ class AppWindowLauncherItemController : public LauncherItemController,
void SetActiveWindow(aura::Window* window);
ui::BaseWindow* GetAppWindow(aura::Window* window);
- const std::string& app_shelf_id() const { return app_shelf_id_; }
+ const std::string& app_id() const { return app_id_; }
+ const std::string& launch_id() const { return launch_id_; }
// LauncherItemController overrides:
bool IsOpen() const override;
@@ -74,8 +75,8 @@ class AppWindowLauncherItemController : public LauncherItemController,
protected:
AppWindowLauncherItemController(Type type,
- const std::string& app_shelf_id,
const std::string& app_id,
+ const std::string& launch_id,
ChromeLauncherController* controller);
// Called when app window is removed from controller.
@@ -102,9 +103,13 @@ class AppWindowLauncherItemController : public LauncherItemController,
// Pointer to the most recently active app window
ui::BaseWindow* last_active_window_ = nullptr;
- // The launcher id associated with this set of windows. There is one
- // AppLauncherItemController for each |app_shelf_id_|.
- const std::string app_shelf_id_;
+ // The application id associated with this set of windows.
+ const std::string app_id_;
+
+ // 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 std::string launch_id_;
// Scoped list of observed windows (for removal on destruction)
ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_;

Powered by Google App Engine
This is Rietveld 408576698