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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.h

Issue 2518423003: Combine shelf platform and windowed app types. (Closed)
Patch Set: Fix kInvalidShelfID typo. Created 4 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CHROME_LAUNCHER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Returns true if the item identified by |id| is pinned. 108 // Returns true if the item identified by |id| is pinned.
109 virtual bool IsPinned(ash::ShelfID id) = 0; 109 virtual bool IsPinned(ash::ShelfID id) = 0;
110 110
111 // Pins/unpins the specified id. 111 // Pins/unpins the specified id.
112 virtual void TogglePinned(ash::ShelfID id) = 0; 112 virtual void TogglePinned(ash::ShelfID id) = 0;
113 113
114 // Returns true if the specified item can be pinned or unpinned. Only apps can 114 // Returns true if the specified item can be pinned or unpinned. Only apps can
115 // be pinned. 115 // be pinned.
116 virtual bool IsPinnable(ash::ShelfID id) const = 0; 116 virtual bool IsPinnable(ash::ShelfID id) const = 0;
117 117
118 // If there is no shelf item in the shelf for application |app_id|, one 118 // If there is no item in the shelf for application |app_id|, one is created.
119 // gets created. The (existing or created) shelf items get then locked 119 // The (existing or created) shelf items get then locked against a user's
120 // against a users un-pinning removal. 120 // un-pinning removal. Used for V1 apps opened as windows that aren't pinned.
121 virtual void LockV1AppWithID(const std::string& app_id) = 0; 121 virtual void LockV1AppWithID(const std::string& app_id) = 0;
122 122
123 // A previously locked shelf item of type |app_id| gets unlocked. If the 123 // A previously locked shelf item of type |app_id| gets unlocked. If the
124 // lock count reaches 0 and the item is not pinned it will go away. 124 // lock count reaches 0 and the item is not pinned it will go away.
125 virtual void UnlockV1AppWithID(const std::string& app_id) = 0; 125 virtual void UnlockV1AppWithID(const std::string& app_id) = 0;
126 126
127 // Requests that the shelf item controller specified by |id| open a new 127 // Requests that the shelf item controller specified by |id| open a new
128 // instance of the app. |event_flags| holds the flags of the event which 128 // instance of the app. |event_flags| holds the flags of the event which
129 // triggered this command. 129 // triggered this command.
130 virtual void Launch(ash::ShelfID id, int event_flags) = 0; 130 virtual void Launch(ash::ShelfID id, int event_flags) = 0;
(...skipping 20 matching lines...) Expand all
151 ash::LaunchSource source, 151 ash::LaunchSource source,
152 int event_flags) = 0; 152 int event_flags) = 0;
153 153
154 // Returns the launch type of app for the specified id. 154 // Returns the launch type of app for the specified id.
155 virtual extensions::LaunchType GetLaunchType(ash::ShelfID id) = 0; 155 virtual extensions::LaunchType GetLaunchType(ash::ShelfID id) = 0;
156 156
157 // Set the image for a specific shelf item (e.g. when set by the app). 157 // Set the image for a specific shelf item (e.g. when set by the app).
158 virtual void SetLauncherItemImage(ash::ShelfID shelf_id, 158 virtual void SetLauncherItemImage(ash::ShelfID shelf_id,
159 const gfx::ImageSkia& image) = 0; 159 const gfx::ImageSkia& image) = 0;
160 160
161 // Find out if the given application |id| is a windowed app item and not a
162 // pinned item in the shelf.
163 virtual bool IsWindowedAppInLauncher(const std::string& app_id) = 0;
164
165 // Updates the launch type of the app for the specified id to |launch_type|. 161 // Updates the launch type of the app for the specified id to |launch_type|.
166 virtual void SetLaunchType(ash::ShelfID id, 162 virtual void SetLaunchType(ash::ShelfID id,
167 extensions::LaunchType launch_type) = 0; 163 extensions::LaunchType launch_type) = 0;
168 164
169 // Notify the controller that the state of an non platform app's tabs 165 // Notify the controller that the state of an non platform app's tabs
170 // have changed, 166 // have changed,
171 virtual void UpdateAppState(content::WebContents* contents, 167 virtual void UpdateAppState(content::WebContents* contents,
172 AppState app_state) = 0; 168 AppState app_state) = 0;
173 169
174 // Returns ShelfID for |contents|. If |contents| is not an app or is not 170 // Returns ShelfID for |contents|. If |contents| is not an app or is not
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // An observer that manages the shelf title and icon for settings windows. 311 // An observer that manages the shelf title and icon for settings windows.
316 SettingsWindowObserver settings_window_observer_; 312 SettingsWindowObserver settings_window_observer_;
317 313
318 // Used to load the images for app items. 314 // Used to load the images for app items.
319 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; 315 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_;
320 316
321 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); 317 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController);
322 }; 318 };
323 319
324 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 320 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698