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_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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Helper to determine if the resource cache should be invalidated. | 70 // Helper to determine if the resource cache should be invalidated. |
71 // This is called on every page load, and can be used to check values that | 71 // This is called on every page load, and can be used to check values that |
72 // don't generate a notification when changed (e.g., system preferences). | 72 // don't generate a notification when changed (e.g., system preferences). |
73 bool NewTabCacheNeedsRefresh(); | 73 bool NewTabCacheNeedsRefresh(); |
74 | 74 |
75 Profile* profile_; | 75 Profile* profile_; |
76 | 76 |
77 scoped_refptr<base::RefCountedMemory> new_tab_html_; | 77 scoped_refptr<base::RefCountedMemory> new_tab_html_; |
78 | 78 |
| 79 #if !defined(OS_ANDROID) |
79 // Returns a message describing any newly-added sync types, or an empty | 80 // Returns a message describing any newly-added sync types, or an empty |
80 // string if all types have already been acknowledged. | 81 // string if all types have already been acknowledged. |
81 base::string16 GetSyncTypeMessage(); | 82 base::string16 GetSyncTypeMessage(); |
82 | 83 |
83 void CreateNewTabIncognitoHTML(); | 84 void CreateNewTabIncognitoHTML(); |
84 void CreateNewTabIncognitoCSS(); | 85 void CreateNewTabIncognitoCSS(); |
85 | 86 |
86 void CreateNewTabGuestHTML(); | 87 void CreateNewTabGuestHTML(); |
87 void CreateNewTabGuestCSS(); | 88 void CreateNewTabGuestCSS(); |
88 | 89 |
89 void CreateNewTabCSS(); | 90 void CreateNewTabCSS(); |
90 | 91 |
91 scoped_refptr<base::RefCountedMemory> new_tab_guest_html_; | 92 scoped_refptr<base::RefCountedMemory> new_tab_guest_html_; |
92 scoped_refptr<base::RefCountedMemory> new_tab_guest_css_; | 93 scoped_refptr<base::RefCountedMemory> new_tab_guest_css_; |
93 scoped_refptr<base::RefCountedMemory> new_tab_incognito_html_; | 94 scoped_refptr<base::RefCountedMemory> new_tab_incognito_html_; |
94 scoped_refptr<base::RefCountedMemory> new_tab_incognito_css_; | 95 scoped_refptr<base::RefCountedMemory> new_tab_incognito_css_; |
95 scoped_refptr<base::RefCountedMemory> new_tab_css_; | 96 scoped_refptr<base::RefCountedMemory> new_tab_css_; |
96 content::NotificationRegistrar registrar_; | 97 content::NotificationRegistrar registrar_; |
97 PrefChangeRegistrar profile_pref_change_registrar_; | 98 PrefChangeRegistrar profile_pref_change_registrar_; |
98 PrefChangeRegistrar local_state_pref_change_registrar_; | 99 PrefChangeRegistrar local_state_pref_change_registrar_; |
| 100 #endif |
99 | 101 |
100 // Set based on platform_util::IsSwipeTrackingFromScrollEventsEnabled. | 102 // Set based on platform_util::IsSwipeTrackingFromScrollEventsEnabled. |
101 bool is_swipe_tracking_from_scroll_events_enabled_; | 103 bool is_swipe_tracking_from_scroll_events_enabled_; |
102 // Set based on NewTabUI::ShouldShowApps. | 104 // Set based on NewTabUI::ShouldShowApps. |
103 bool should_show_apps_page_; | 105 bool should_show_apps_page_; |
104 // The next three all default to true and can be manually set, e.g., by the | 106 // The next three all default to true and can be manually set, e.g., by the |
105 // chrome://apps page. | 107 // chrome://apps page. |
106 bool should_show_most_visited_page_; | 108 bool should_show_most_visited_page_; |
107 bool should_show_other_devices_menu_; | 109 bool should_show_other_devices_menu_; |
108 bool should_show_recently_closed_menu_; | 110 bool should_show_recently_closed_menu_; |
109 | 111 |
110 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); | 112 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); |
111 }; | 113 }; |
112 | 114 |
113 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ | 115 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ |
OLD | NEW |