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

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

Issue 2608013002: mash: Replace ShelfItemDelegate::CanPin with ShelfItem::pinned_by_policy. (Closed)
Patch Set: Fix test. Created 3 years, 11 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 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 108
109 // Unpins the specified id, closing if not running. 109 // Unpins the specified id, closing if not running.
110 virtual void Unpin(ash::ShelfID id) = 0; 110 virtual void Unpin(ash::ShelfID id) = 0;
111 111
112 // Returns true if the item identified by |id| is pinned. 112 // Returns true if the item identified by |id| is pinned.
113 virtual bool IsPinned(ash::ShelfID id) = 0; 113 virtual bool IsPinned(ash::ShelfID id) = 0;
114 114
115 // Pins/unpins the specified id. 115 // Pins/unpins the specified id.
116 virtual void TogglePinned(ash::ShelfID id) = 0; 116 virtual void TogglePinned(ash::ShelfID id) = 0;
117 117
118 // Returns true if the specified item can be pinned or unpinned. Only apps can
119 // be pinned.
120 virtual bool IsPinnable(ash::ShelfID id) const = 0;
121
122 // If there is no item in the shelf for application |app_id|, one is created. 118 // If there is no item in the shelf for application |app_id|, one is created.
123 // The (existing or created) shelf items get then locked against a user's 119 // The (existing or created) shelf items get then locked against a user's
124 // un-pinning removal. Used for V1 apps opened as windows that aren't pinned. 120 // un-pinning removal. Used for V1 apps opened as windows that aren't pinned.
125 virtual void LockV1AppWithID(const std::string& app_id) = 0; 121 virtual void LockV1AppWithID(const std::string& app_id) = 0;
126 122
127 // 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
128 // 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.
129 virtual void UnlockV1AppWithID(const std::string& app_id) = 0; 125 virtual void UnlockV1AppWithID(const std::string& app_id) = 0;
130 126
131 // 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
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // An observer that manages the shelf title and icon for settings windows. 312 // An observer that manages the shelf title and icon for settings windows.
317 SettingsWindowObserver settings_window_observer_; 313 SettingsWindowObserver settings_window_observer_;
318 314
319 // Used to load the images for app items. 315 // Used to load the images for app items.
320 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; 316 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_;
321 317
322 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); 318 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController);
323 }; 319 };
324 320
325 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 321 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698