OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/offline/offline_load_service.h" | 5 #include "chrome/browser/chromeos/offline/offline_load_service.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
9 #include "chrome/browser/browser_thread.h" | |
10 #include "chrome/browser/tab_contents/navigation_controller.h" | |
11 #include "chrome/browser/tab_contents/tab_contents.h" | |
12 #include "chrome/browser/tab_contents/tab_util.h" | 9 #include "chrome/browser/tab_contents/tab_util.h" |
13 #include "chrome/common/notification_details.h" | 10 #include "chrome/common/notification_details.h" |
14 #include "chrome/common/notification_source.h" | 11 #include "chrome/common/notification_source.h" |
| 12 #include "content/browser/browser_thread.h" |
| 13 #include "content/browser/tab_contents/navigation_controller.h" |
| 14 #include "content/browser/tab_contents/tab_contents.h" |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
17 | 17 |
18 // A utility class that serves a singleton instance of OfflineLoadService. | 18 // A utility class that serves a singleton instance of OfflineLoadService. |
19 // OfflineLoadSerivce itself cannot be a singleton as it implements | 19 // OfflineLoadSerivce itself cannot be a singleton as it implements |
20 // RefCount interface. | 20 // RefCount interface. |
21 class OfflineLoadServiceSingleton { | 21 class OfflineLoadServiceSingleton { |
22 public: | 22 public: |
23 chromeos::OfflineLoadService* offline_load_service() { | 23 chromeos::OfflineLoadService* offline_load_service() { |
24 return offline_load_service_.get(); | 24 return offline_load_service_.get(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 void OfflineLoadService::RegisterNotification( | 100 void OfflineLoadService::RegisterNotification( |
101 NavigationController* navigation_controller) { | 101 NavigationController* navigation_controller) { |
102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
103 registrar_.Add(this, NotificationType::TAB_CLOSED, | 103 registrar_.Add(this, NotificationType::TAB_CLOSED, |
104 Source<NavigationController>( | 104 Source<NavigationController>( |
105 navigation_controller)); | 105 navigation_controller)); |
106 } | 106 } |
107 | 107 |
108 } // namespace chromeos | 108 } // namespace chromeos |
OLD | NEW |