Chromium Code Reviews| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <utility> | 12 #include <utility> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
| 19 #include "base/task/cancelable_task_tracker.h" | 19 #include "base/task/cancelable_task_tracker.h" |
| 20 #include "base/task_scheduler/post_task.h" | |
|
grt (UTC plus 2)
2017/03/23 11:24:57
move to .cc file
chengx
2017/03/23 21:16:11
Done.
| |
| 20 #include "base/timer/timer.h" | 21 #include "base/timer/timer.h" |
| 21 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 22 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 22 #include "chrome/browser/win/jumplist_updater.h" | 23 #include "chrome/browser/win/jumplist_updater.h" |
| 23 #include "components/history/core/browser/history_service.h" | 24 #include "components/history/core/browser/history_service.h" |
| 24 #include "components/history/core/browser/history_types.h" | 25 #include "components/history/core/browser/history_types.h" |
| 25 #include "components/history/core/browser/top_sites_observer.h" | 26 #include "components/history/core/browser/top_sites_observer.h" |
| 26 #include "components/keyed_service/core/refcounted_keyed_service.h" | 27 #include "components/keyed_service/core/refcounted_keyed_service.h" |
| 27 #include "components/sessions/core/tab_restore_service.h" | 28 #include "components/sessions/core/tab_restore_service.h" |
| 28 #include "components/sessions/core/tab_restore_service_observer.h" | 29 #include "components/sessions/core/tab_restore_service_observer.h" |
| 29 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
| 30 #include "content/public/browser/notification_observer.h" | 31 #include "content/public/browser/notification_observer.h" |
| 31 #include "content/public/browser/notification_registrar.h" | 32 #include "content/public/browser/notification_registrar.h" |
| 32 | 33 |
|
grt (UTC plus 2)
2017/03/23 11:24:57
forward declare SequencedTaskRunner in namespace b
chengx
2017/03/23 21:16:11
Done.
| |
| 33 namespace chrome { | 34 namespace chrome { |
| 34 struct FaviconImageResult; | 35 struct FaviconImageResult; |
| 35 } | 36 } |
| 36 | 37 |
| 37 class JumpListFactory; | 38 class JumpListFactory; |
| 38 class PrefChangeRegistrar; | 39 class PrefChangeRegistrar; |
| 39 class Profile; | 40 class Profile; |
| 40 | 41 |
| 41 // A class which implements an application JumpList. | 42 // A class which implements an application JumpList. |
| 42 // This class encapsulates operations required for updating an application | 43 // This class encapsulates operations required for updating an application |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 // Timer for requesting delayed updates of the jumplist. | 175 // Timer for requesting delayed updates of the jumplist. |
| 175 base::OneShotTimer timer_; | 176 base::OneShotTimer timer_; |
| 176 | 177 |
| 177 // Holds data that can be accessed from multiple threads. | 178 // Holds data that can be accessed from multiple threads. |
| 178 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_; | 179 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_; |
| 179 | 180 |
| 180 // Id of last favicon task. It's used to cancel current task if a new one | 181 // Id of last favicon task. It's used to cancel current task if a new one |
| 181 // comes in before it finishes. | 182 // comes in before it finishes. |
| 182 base::CancelableTaskTracker::TaskId task_id_; | 183 base::CancelableTaskTracker::TaskId task_id_; |
| 183 | 184 |
| 185 // A task runner which runs the background file deletion tasks sequentially. | |
| 186 scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_; | |
| 187 | |
| 184 // For callbacks may be run after destruction. | 188 // For callbacks may be run after destruction. |
| 185 base::WeakPtrFactory<JumpList> weak_ptr_factory_; | 189 base::WeakPtrFactory<JumpList> weak_ptr_factory_; |
| 186 | 190 |
| 187 DISALLOW_COPY_AND_ASSIGN(JumpList); | 191 DISALLOW_COPY_AND_ASSIGN(JumpList); |
| 188 }; | 192 }; |
| 189 | 193 |
| 190 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ | 194 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ |
| OLD | NEW |