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

Side by Side Diff: chrome/browser/ui/ash/launcher/extension_app_window_launcher_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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_CONTROLLER_ H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_CONTROLLER_ H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_CONTROLLER_ H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_CONTROLLER_ H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Unregisters a app window with the shelf and this object. 61 // Unregisters a app window with the shelf and this object.
62 void UnregisterApp(aura::Window* window); 62 void UnregisterApp(aura::Window* window);
63 63
64 // Check if a given window is known to the launcher controller. 64 // Check if a given window is known to the launcher controller.
65 bool IsRegisteredApp(aura::Window* window); 65 bool IsRegisteredApp(aura::Window* window);
66 66
67 private: 67 private:
68 using AppControllerMap = 68 using AppControllerMap =
69 std::map<std::string, ExtensionAppWindowLauncherItemController*>; 69 std::map<std::string, ExtensionAppWindowLauncherItemController*>;
70 using WindowToAppShelfIdMap = std::map<aura::Window*, std::string>; 70 using WindowToAppShelfIdMap = std::map<aura::Window*, std::string>;
71 using AppShelfIdToShelfIdMap = std::map<std::string, ash::ShelfID>;
72 71
73 // A set of unowned AppWindowRegistry pointers for loaded users. 72 // A set of unowned AppWindowRegistry pointers for loaded users.
74 // Note that this will only be used with multiple users in the side by side 73 // Note that this will only be used with multiple users in the side by side
75 // mode. 74 // mode.
76 std::set<extensions::AppWindowRegistry*> registry_; 75 std::set<extensions::AppWindowRegistry*> registry_;
77 76
78 // Map of app launcher id to controller. 77 // Map of app launcher id to controller.
79 AppControllerMap app_controller_map_; 78 AppControllerMap app_controller_map_;
80 79
81 // Allows us to get from an aura::Window to the app shelf id. 80 // Allows us to get from an aura::Window to the app shelf id.
82 WindowToAppShelfIdMap window_to_app_shelf_id_map_; 81 WindowToAppShelfIdMap window_to_app_shelf_id_map_;
83 82
84 // Map of app shelf id to shelf id.
85 AppShelfIdToShelfIdMap app_shelf_id_to_shelf_id_map_;
86
87 DISALLOW_COPY_AND_ASSIGN(ExtensionAppWindowLauncherController); 83 DISALLOW_COPY_AND_ASSIGN(ExtensionAppWindowLauncherController);
88 }; 84 };
89 85
90 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_CONTROLL ER_H_ 86 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_CONTROLL ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698