| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 void set_should_show_other_devices_menu(bool should_show_other_devices_menu) { | 50 void set_should_show_other_devices_menu(bool should_show_other_devices_menu) { |
| 51 should_show_other_devices_menu_ = should_show_other_devices_menu; | 51 should_show_other_devices_menu_ = should_show_other_devices_menu; |
| 52 } | 52 } |
| 53 void set_should_show_recently_closed_menu( | 53 void set_should_show_recently_closed_menu( |
| 54 bool should_show_recently_closed_menu) { | 54 bool should_show_recently_closed_menu) { |
| 55 should_show_recently_closed_menu_ = should_show_recently_closed_menu; | 55 should_show_recently_closed_menu_ = should_show_recently_closed_menu; |
| 56 } | 56 } |
| 57 // content::NotificationObserver interface. | 57 // content::NotificationObserver interface. |
| 58 virtual void Observe(int type, | 58 virtual void Observe(int type, |
| 59 const content::NotificationSource& source, | 59 const content::NotificationSource& source, |
| 60 const content::NotificationDetails& details) OVERRIDE; | 60 const content::NotificationDetails& details) override; |
| 61 | 61 |
| 62 static WindowType GetWindowType( | 62 static WindowType GetWindowType( |
| 63 Profile* profile, content::RenderProcessHost* render_host); | 63 Profile* profile, content::RenderProcessHost* render_host); |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 void OnPreferenceChanged(); | 66 void OnPreferenceChanged(); |
| 67 | 67 |
| 68 void CreateNewTabHTML(); | 68 void CreateNewTabHTML(); |
| 69 | 69 |
| 70 // Helper to determine if the resource cache should be invalidated. | 70 // Helper to determine if the resource cache should be invalidated. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // The next three all default to true and can be manually set, e.g., by the | 104 // The next three all default to true and can be manually set, e.g., by the |
| 105 // chrome://apps page. | 105 // chrome://apps page. |
| 106 bool should_show_most_visited_page_; | 106 bool should_show_most_visited_page_; |
| 107 bool should_show_other_devices_menu_; | 107 bool should_show_other_devices_menu_; |
| 108 bool should_show_recently_closed_menu_; | 108 bool should_show_recently_closed_menu_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); | 110 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ | 113 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ |
| OLD | NEW |