| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WIN_JUMPLIST_H_ | 5 #ifndef CHROME_BROWSER_WIN_JUMPLIST_H_ |
| 6 #define CHROME_BROWSER_WIN_JUMPLIST_H_ | 6 #define CHROME_BROWSER_WIN_JUMPLIST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // after requests storms have subsided. | 182 // after requests storms have subsided. |
| 183 void DeferredTabRestoreServiceChanged(); | 183 void DeferredTabRestoreServiceChanged(); |
| 184 | 184 |
| 185 // Deletes icon files of |category| in |icon_dir| which are not in the cache | 185 // Deletes icon files of |category| in |icon_dir| which are not in the cache |
| 186 // anymore. | 186 // anymore. |
| 187 void DeleteIconFiles(const base::FilePath& icon_dir, | 187 void DeleteIconFiles(const base::FilePath& icon_dir, |
| 188 JumpListCategory category); | 188 JumpListCategory category); |
| 189 | 189 |
| 190 // Creates at most |max_items| icon files of |category| in |icon_dir| for the | 190 // Creates at most |max_items| icon files of |category| in |icon_dir| for the |
| 191 // asynchrounously loaded icons stored in |item_list|. | 191 // asynchrounously loaded icons stored in |item_list|. |
| 192 void CreateIconFiles(const base::FilePath& icon_dir, | 192 // Returns the number of new icon files created. |
| 193 const ShellLinkItemList& item_list, | 193 int CreateIconFiles(const base::FilePath& icon_dir, |
| 194 size_t max_items, | 194 const ShellLinkItemList& item_list, |
| 195 JumpListCategory category); | 195 size_t max_items, |
| 196 JumpListCategory category); |
| 196 | 197 |
| 197 // Updates icon files in |icon_dir|, which includes deleting old icons and | 198 // Updates icon files in |icon_dir|, which includes deleting old icons and |
| 198 // creating at most |slot_limit| new icons for |page_list|. | 199 // creating at most |slot_limit| new icons for |page_list|. |
| 199 void UpdateIconFiles(const base::FilePath& icon_dir, | 200 // Returns the number of new icon files created. |
| 200 const ShellLinkItemList& page_list, | 201 int UpdateIconFiles(const base::FilePath& icon_dir, |
| 201 size_t slot_limit, | 202 const ShellLinkItemList& page_list, |
| 202 JumpListCategory category); | 203 size_t slot_limit, |
| 204 JumpListCategory category); |
| 203 | 205 |
| 204 // Updates the jumplist, once all the data has been fetched. This method calls | 206 // Updates the jumplist, once all the data has been fetched. This method calls |
| 205 // UpdateJumpList() to do most of the work. | 207 // UpdateJumpList() to do most of the work. |
| 206 void RunUpdateJumpList( | 208 void RunUpdateJumpList( |
| 207 IncognitoModePrefs::Availability incognito_availability, | 209 IncognitoModePrefs::Availability incognito_availability, |
| 208 const base::string16& app_id, | 210 const base::string16& app_id, |
| 209 const base::FilePath& profile_dir, | 211 const base::FilePath& profile_dir, |
| 210 base::RefCountedData<JumpListData>* ref_counted_data); | 212 base::RefCountedData<JumpListData>* ref_counted_data); |
| 211 | 213 |
| 212 // Updates the application JumpList, which consists of 1) delete old icon | 214 // Updates the application JumpList, which consists of 1) delete old icon |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // JumpListIconsOld directory. | 272 // JumpListIconsOld directory. |
| 271 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_; | 273 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_; |
| 272 | 274 |
| 273 // For callbacks may be run after destruction. | 275 // For callbacks may be run after destruction. |
| 274 base::WeakPtrFactory<JumpList> weak_ptr_factory_; | 276 base::WeakPtrFactory<JumpList> weak_ptr_factory_; |
| 275 | 277 |
| 276 DISALLOW_COPY_AND_ASSIGN(JumpList); | 278 DISALLOW_COPY_AND_ASSIGN(JumpList); |
| 277 }; | 279 }; |
| 278 | 280 |
| 279 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ | 281 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ |
| OLD | NEW |