| OLD | NEW |
| 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_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 ash::ShelfItemType shelf_item_type); | 209 ash::ShelfItemType shelf_item_type); |
| 210 | 210 |
| 211 // Invoked when the associated browser or app is closed. | 211 // Invoked when the associated browser or app is closed. |
| 212 void LauncherItemClosed(ash::ShelfID id); | 212 void LauncherItemClosed(ash::ShelfID id); |
| 213 | 213 |
| 214 // Internal helpers for pinning and unpinning that handle both | 214 // Internal helpers for pinning and unpinning that handle both |
| 215 // client-triggered and internal pinning operations. | 215 // client-triggered and internal pinning operations. |
| 216 void DoPinAppWithID(const std::string& app_id); | 216 void DoPinAppWithID(const std::string& app_id); |
| 217 void DoUnpinAppWithID(const std::string& app_id, bool update_prefs); | 217 void DoUnpinAppWithID(const std::string& app_id, bool update_prefs); |
| 218 | 218 |
| 219 // Pin a running app with |shelf_id| internally to |index|. It returns | 219 // Pin a running app with |shelf_id| internally to |index|. |
| 220 // the index where the item was pinned. | 220 void PinRunningAppInternal(int index, ash::ShelfID shelf_id); |
| 221 int PinRunningAppInternal(int index, ash::ShelfID shelf_id); | |
| 222 | 221 |
| 223 // Unpin a locked application. This is an internal call which converts the | 222 // Unpin a locked application. This is an internal call which converts the |
| 224 // model type of the given app index from a shortcut into an unpinned running | 223 // model type of the given app index from a shortcut into an unpinned running |
| 225 // app. | 224 // app. |
| 226 void UnpinRunningAppInternal(int index); | 225 void UnpinRunningAppInternal(int index); |
| 227 | 226 |
| 228 // Updates pin position for the item specified by |id| in sync model. | 227 // Updates pin position for the item specified by |id| in sync model. |
| 229 void SyncPinPosition(ash::ShelfID id); | 228 void SyncPinPosition(ash::ShelfID id); |
| 230 | 229 |
| 231 // Re-syncs shelf model. | 230 // Re-syncs shelf model. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 typedef std::vector<std::string> RunningAppListIds; | 363 typedef std::vector<std::string> RunningAppListIds; |
| 365 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; | 364 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; |
| 366 RunningAppListIdMap last_used_running_application_order_; | 365 RunningAppListIdMap last_used_running_application_order_; |
| 367 | 366 |
| 368 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; | 367 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; |
| 369 | 368 |
| 370 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); | 369 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); |
| 371 }; | 370 }; |
| 372 | 371 |
| 373 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 372 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| OLD | NEW |