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_JUMPLIST_WIN_H_ | 5 #ifndef CHROME_BROWSER_JUMPLIST_WIN_H_ |
6 #define CHROME_BROWSER_JUMPLIST_WIN_H_ | 6 #define CHROME_BROWSER_JUMPLIST_WIN_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void PostRunUpdate(); | 127 void PostRunUpdate(); |
128 | 128 |
129 // Runnable method that updates the jumplist, once all the data | 129 // Runnable method that updates the jumplist, once all the data |
130 // has been fetched. | 130 // has been fetched. |
131 void RunUpdate(IncognitoModePrefs::Availability incognito_availability); | 131 void RunUpdate(IncognitoModePrefs::Availability incognito_availability); |
132 | 132 |
133 // Helper method for RunUpdate to create icon files for the asynchrounously | 133 // Helper method for RunUpdate to create icon files for the asynchrounously |
134 // loaded icons. | 134 // loaded icons. |
135 void CreateIconFiles(const ShellLinkItemList& item_list); | 135 void CreateIconFiles(const ShellLinkItemList& item_list); |
136 | 136 |
137 // For callbacks may be run after destruction. | |
138 base::WeakPtrFactory<JumpList> weak_ptr_factory_; | |
139 | |
140 // Tracks FaviconService tasks. | 137 // Tracks FaviconService tasks. |
141 base::CancelableTaskTracker cancelable_task_tracker_; | 138 base::CancelableTaskTracker cancelable_task_tracker_; |
142 | 139 |
143 // The Profile object is used to listen for events | 140 // The Profile object is used to listen for events |
144 Profile* profile_; | 141 Profile* profile_; |
145 | 142 |
146 // Lives on the UI thread. | 143 // Lives on the UI thread. |
147 scoped_ptr<content::NotificationRegistrar> registrar_; | 144 scoped_ptr<content::NotificationRegistrar> registrar_; |
148 scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; | 145 scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; |
149 | 146 |
(...skipping 17 matching lines...) Expand all Loading... |
167 std::list<URLPair> icon_urls_; | 164 std::list<URLPair> icon_urls_; |
168 | 165 |
169 // Id of last favicon task. It's used to cancel current task if a new one | 166 // Id of last favicon task. It's used to cancel current task if a new one |
170 // comes in before it finishes. | 167 // comes in before it finishes. |
171 base::CancelableTaskTracker::TaskId task_id_; | 168 base::CancelableTaskTracker::TaskId task_id_; |
172 | 169 |
173 // Lock for most_visited_pages_, recently_closed_pages_, icon_urls_ | 170 // Lock for most_visited_pages_, recently_closed_pages_, icon_urls_ |
174 // as they may be used by up to 3 threads. | 171 // as they may be used by up to 3 threads. |
175 base::Lock list_lock_; | 172 base::Lock list_lock_; |
176 | 173 |
| 174 // For callbacks may be run after destruction. |
| 175 base::WeakPtrFactory<JumpList> weak_ptr_factory_; |
| 176 |
177 DISALLOW_COPY_AND_ASSIGN(JumpList); | 177 DISALLOW_COPY_AND_ASSIGN(JumpList); |
178 }; | 178 }; |
179 | 179 |
180 #endif // CHROME_BROWSER_JUMPLIST_WIN_H_ | 180 #endif // CHROME_BROWSER_JUMPLIST_WIN_H_ |
OLD | NEW |