Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.h

Issue 13926002: Always show the NTP apps page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 // regenerate them all the time. 24 // regenerate them all the time.
25 class NTPResourceCache : public content::NotificationObserver, 25 class NTPResourceCache : public content::NotificationObserver,
26 public ProfileKeyedService { 26 public ProfileKeyedService {
27 public: 27 public:
28 explicit NTPResourceCache(Profile* profile); 28 explicit NTPResourceCache(Profile* profile);
29 virtual ~NTPResourceCache(); 29 virtual ~NTPResourceCache();
30 30
31 base::RefCountedMemory* GetNewTabHTML(bool is_incognito); 31 base::RefCountedMemory* GetNewTabHTML(bool is_incognito);
32 base::RefCountedMemory* GetNewTabCSS(bool is_incognito); 32 base::RefCountedMemory* GetNewTabCSS(bool is_incognito);
33 33
34 void set_should_show_apps_page(bool should_show_apps_page) {
35 should_show_apps_page_ = should_show_apps_page;
36 }
34 void set_should_show_most_visited_page(bool should_show_most_visited_page) { 37 void set_should_show_most_visited_page(bool should_show_most_visited_page) {
35 should_show_most_visited_page_ = should_show_most_visited_page; 38 should_show_most_visited_page_ = should_show_most_visited_page;
36 } 39 }
37 void set_should_show_other_devices_menu(bool should_show_other_devices_menu) { 40 void set_should_show_other_devices_menu(bool should_show_other_devices_menu) {
38 should_show_other_devices_menu_ = should_show_other_devices_menu; 41 should_show_other_devices_menu_ = should_show_other_devices_menu;
39 } 42 }
40 void set_should_show_recently_closed_menu( 43 void set_should_show_recently_closed_menu(
41 bool should_show_recently_closed_menu) { 44 bool should_show_recently_closed_menu) {
42 should_show_recently_closed_menu_ = should_show_recently_closed_menu; 45 should_show_recently_closed_menu_ = should_show_recently_closed_menu;
43 } 46 }
(...skipping 30 matching lines...) Expand all
74 scoped_refptr<base::RefCountedMemory> new_tab_incognito_html_; 77 scoped_refptr<base::RefCountedMemory> new_tab_incognito_html_;
75 scoped_refptr<base::RefCountedMemory> new_tab_incognito_css_; 78 scoped_refptr<base::RefCountedMemory> new_tab_incognito_css_;
76 scoped_refptr<base::RefCountedMemory> new_tab_css_; 79 scoped_refptr<base::RefCountedMemory> new_tab_css_;
77 content::NotificationRegistrar registrar_; 80 content::NotificationRegistrar registrar_;
78 PrefChangeRegistrar profile_pref_change_registrar_; 81 PrefChangeRegistrar profile_pref_change_registrar_;
79 PrefChangeRegistrar local_state_pref_change_registrar_; 82 PrefChangeRegistrar local_state_pref_change_registrar_;
80 #endif 83 #endif
81 84
82 // Set based on platform_util::IsSwipeTrackingFromScrollEventsEnabled. 85 // Set based on platform_util::IsSwipeTrackingFromScrollEventsEnabled.
83 bool is_swipe_tracking_from_scroll_events_enabled_; 86 bool is_swipe_tracking_from_scroll_events_enabled_;
84 // Set based on extensions::IsAppLauncherEnabled. 87 // Set based on NewTabUI::ShouldShowApps.
85 bool should_show_apps_page_; 88 bool should_show_apps_page_;
86 // The next three all default to true and can be manually set, e.g., by the 89 // The next three all default to true and can be manually set, e.g., by the
87 // chrome://apps page. 90 // chrome://apps page.
88 bool should_show_most_visited_page_; 91 bool should_show_most_visited_page_;
89 bool should_show_other_devices_menu_; 92 bool should_show_other_devices_menu_;
90 bool should_show_recently_closed_menu_; 93 bool should_show_recently_closed_menu_;
91 94
92 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); 95 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache);
93 }; 96 };
94 97
95 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ 98 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698