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 #ifndef CHROME_BROWSER_DOM_UI_NTP_RESOURCE_CACHE_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_NTP_RESOURCE_CACHE_H_ |
6 #define CHROME_BROWSER_DOM_UI_NTP_RESOURCE_CACHE_H_ | 6 #define CHROME_BROWSER_DOM_UI_NTP_RESOURCE_CACHE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "chrome/common/notification_observer.h" |
11 #include "chrome/common/notification_registrar.h" | 12 #include "chrome/common/notification_registrar.h" |
12 | 13 |
13 class Profile; | 14 class Profile; |
14 class RefCountedBytes; | 15 class RefCountedBytes; |
15 | 16 |
16 // This class keeps a cache of NTP resources (HTML and CSS) so we don't have to | 17 // This class keeps a cache of NTP resources (HTML and CSS) so we don't have to |
17 // regenerate them all the time. | 18 // regenerate them all the time. |
18 class NTPResourceCache : public NotificationObserver { | 19 class NTPResourceCache : public NotificationObserver { |
19 public: | 20 public: |
20 explicit NTPResourceCache(Profile* profile); | 21 explicit NTPResourceCache(Profile* profile); |
(...skipping 19 matching lines...) Expand all Loading... |
40 scoped_refptr<RefCountedBytes> new_tab_incognito_css_; | 41 scoped_refptr<RefCountedBytes> new_tab_incognito_css_; |
41 void CreateNewTabCSS(); | 42 void CreateNewTabCSS(); |
42 scoped_refptr<RefCountedBytes> new_tab_css_; | 43 scoped_refptr<RefCountedBytes> new_tab_css_; |
43 | 44 |
44 NotificationRegistrar registrar_; | 45 NotificationRegistrar registrar_; |
45 | 46 |
46 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); | 47 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); |
47 }; | 48 }; |
48 | 49 |
49 #endif // CHROME_BROWSER_DOM_UI_NTP_RESOURCE_CACHE_H_ | 50 #endif // CHROME_BROWSER_DOM_UI_NTP_RESOURCE_CACHE_H_ |
OLD | NEW |