| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class NTPResourceCache : public NotificationObserver, | 21 class NTPResourceCache : public NotificationObserver, |
| 22 public ProfileKeyedService { | 22 public ProfileKeyedService { |
| 23 public: | 23 public: |
| 24 explicit NTPResourceCache(Profile* profile); | 24 explicit NTPResourceCache(Profile* profile); |
| 25 virtual ~NTPResourceCache(); | 25 virtual ~NTPResourceCache(); |
| 26 | 26 |
| 27 RefCountedBytes* GetNewTabHTML(bool is_incognito); | 27 RefCountedBytes* GetNewTabHTML(bool is_incognito); |
| 28 RefCountedBytes* GetNewTabCSS(bool is_incognito); | 28 RefCountedBytes* GetNewTabCSS(bool is_incognito); |
| 29 | 29 |
| 30 // NotificationObserver interface. | 30 // NotificationObserver interface. |
| 31 virtual void Observe(NotificationType type, | 31 virtual void Observe(int type, |
| 32 const NotificationSource& source, | 32 const NotificationSource& source, |
| 33 const NotificationDetails& details); | 33 const NotificationDetails& details); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 Profile* profile_; | 36 Profile* profile_; |
| 37 | 37 |
| 38 void CreateNewTabIncognitoHTML(); | 38 void CreateNewTabIncognitoHTML(); |
| 39 scoped_refptr<RefCountedBytes> new_tab_incognito_html_; | 39 scoped_refptr<RefCountedBytes> new_tab_incognito_html_; |
| 40 void CreateNewTabHTML(); | 40 void CreateNewTabHTML(); |
| 41 scoped_refptr<RefCountedBytes> new_tab_html_; | 41 scoped_refptr<RefCountedBytes> new_tab_html_; |
| 42 | 42 |
| 43 void CreateNewTabIncognitoCSS(); | 43 void CreateNewTabIncognitoCSS(); |
| 44 scoped_refptr<RefCountedBytes> new_tab_incognito_css_; | 44 scoped_refptr<RefCountedBytes> new_tab_incognito_css_; |
| 45 void CreateNewTabCSS(); | 45 void CreateNewTabCSS(); |
| 46 scoped_refptr<RefCountedBytes> new_tab_css_; | 46 scoped_refptr<RefCountedBytes> new_tab_css_; |
| 47 | 47 |
| 48 NotificationRegistrar registrar_; | 48 NotificationRegistrar registrar_; |
| 49 PrefChangeRegistrar pref_change_registrar_; | 49 PrefChangeRegistrar pref_change_registrar_; |
| 50 | 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); | 51 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ | 54 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ |
| OLD | NEW |