| 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 13 matching lines...) Expand all Loading... |
| 24 #include "components/history/core/browser/history_types.h" | 24 #include "components/history/core/browser/history_types.h" |
| 25 #include "components/history/core/browser/top_sites_observer.h" | 25 #include "components/history/core/browser/top_sites_observer.h" |
| 26 #include "components/keyed_service/core/refcounted_keyed_service.h" | 26 #include "components/keyed_service/core/refcounted_keyed_service.h" |
| 27 #include "components/sessions/core/tab_restore_service.h" | 27 #include "components/sessions/core/tab_restore_service.h" |
| 28 #include "components/sessions/core/tab_restore_service_observer.h" | 28 #include "components/sessions/core/tab_restore_service_observer.h" |
| 29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
| 30 #include "content/public/browser/notification_observer.h" | 30 #include "content/public/browser/notification_observer.h" |
| 31 #include "content/public/browser/notification_registrar.h" | 31 #include "content/public/browser/notification_registrar.h" |
| 32 | 32 |
| 33 namespace chrome { | 33 namespace chrome { |
| 34 struct FaviconImageResult; | 34 struct FaviconRawBitmapResult; |
| 35 } | 35 } |
| 36 | 36 |
| 37 class JumpListFactory; | 37 class JumpListFactory; |
| 38 class PrefChangeRegistrar; | 38 class PrefChangeRegistrar; |
| 39 class Profile; | 39 class Profile; |
| 40 | 40 |
| 41 // A class which implements an application JumpList. | 41 // A class which implements an application JumpList. |
| 42 // This class encapsulates operations required for updating an application | 42 // This class encapsulates operations required for updating an application |
| 43 // JumpList: | 43 // JumpList: |
| 44 // * Retrieving "Most Visited" pages from HistoryService; | 44 // * Retrieving "Most Visited" pages from HistoryService; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // This function sends a query to HistoryService. | 125 // This function sends a query to HistoryService. |
| 126 // When finishing loading all favicons, this function posts a task that | 126 // When finishing loading all favicons, this function posts a task that |
| 127 // decompresses collected favicons and updates a JumpList. | 127 // decompresses collected favicons and updates a JumpList. |
| 128 void StartLoadingFavicon(); | 128 void StartLoadingFavicon(); |
| 129 | 129 |
| 130 // A callback function for HistoryService that notify when a requested favicon | 130 // A callback function for HistoryService that notify when a requested favicon |
| 131 // is available. | 131 // is available. |
| 132 // To avoid file operations, this function just attaches the given data to | 132 // To avoid file operations, this function just attaches the given data to |
| 133 // a ShellLinkItem object. | 133 // a ShellLinkItem object. |
| 134 void OnFaviconDataAvailable( | 134 void OnFaviconDataAvailable( |
| 135 const favicon_base::FaviconImageResult& image_result); | 135 const favicon_base::FaviconRawBitmapResult& image_result); |
| 136 | 136 |
| 137 // Callback for TopSites that notifies when the "Most | 137 // Callback for TopSites that notifies when the "Most |
| 138 // Visited" list is available. This function updates the ShellLinkItemList | 138 // Visited" list is available. This function updates the ShellLinkItemList |
| 139 // objects and send another query that retrieves a favicon for each URL in | 139 // objects and send another query that retrieves a favicon for each URL in |
| 140 // the list. | 140 // the list. |
| 141 void OnMostVisitedURLsAvailable( | 141 void OnMostVisitedURLsAvailable( |
| 142 const history::MostVisitedURLList& data); | 142 const history::MostVisitedURLList& data); |
| 143 | 143 |
| 144 // Callback for changes to the incognito mode availability pref. | 144 // Callback for changes to the incognito mode availability pref. |
| 145 void OnIncognitoAvailabilityChanged(); | 145 void OnIncognitoAvailabilityChanged(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // comes in before it finishes. | 181 // comes in before it finishes. |
| 182 base::CancelableTaskTracker::TaskId task_id_; | 182 base::CancelableTaskTracker::TaskId task_id_; |
| 183 | 183 |
| 184 // For callbacks may be run after destruction. | 184 // For callbacks may be run after destruction. |
| 185 base::WeakPtrFactory<JumpList> weak_ptr_factory_; | 185 base::WeakPtrFactory<JumpList> weak_ptr_factory_; |
| 186 | 186 |
| 187 DISALLOW_COPY_AND_ASSIGN(JumpList); | 187 DISALLOW_COPY_AND_ASSIGN(JumpList); |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ | 190 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ |
| OLD | NEW |