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