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_NEW_TAB_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 bool showing_sync_bubble() { return showing_sync_bubble_; } | 61 bool showing_sync_bubble() { return showing_sync_bubble_; } |
62 void set_showing_sync_bubble(bool showing) { showing_sync_bubble_ = showing; } | 62 void set_showing_sync_bubble(bool showing) { showing_sync_bubble_ = showing; } |
63 | 63 |
64 class NewTabHTMLSource : public content::URLDataSource { | 64 class NewTabHTMLSource : public content::URLDataSource { |
65 public: | 65 public: |
66 explicit NewTabHTMLSource(Profile* profile); | 66 explicit NewTabHTMLSource(Profile* profile); |
67 virtual ~NewTabHTMLSource(); | 67 virtual ~NewTabHTMLSource(); |
68 | 68 |
69 // content::URLDataSource implementation. | 69 // content::URLDataSource implementation. |
70 virtual std::string GetSource() OVERRIDE; | 70 virtual std::string GetSource() const OVERRIDE; |
71 virtual void StartDataRequest( | 71 virtual void StartDataRequest( |
72 const std::string& path, | 72 const std::string& path, |
73 bool is_incognito, | 73 bool is_incognito, |
74 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; | 74 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; |
75 virtual std::string GetMimeType(const std::string&) const OVERRIDE; | 75 virtual std::string GetMimeType(const std::string&) const OVERRIDE; |
76 virtual bool ShouldReplaceExistingSource() const OVERRIDE; | 76 virtual bool ShouldReplaceExistingSource() const OVERRIDE; |
77 virtual bool ShouldAddContentSecurityPolicy() const OVERRIDE; | 77 virtual bool ShouldAddContentSecurityPolicy() const OVERRIDE; |
78 | 78 |
79 // Adds |resource| to the source. |resource_id| is resource id or 0, | 79 // Adds |resource| to the source. |resource_id| is resource id or 0, |
80 // which means return empty data set. |mime_type| is mime type of the | 80 // which means return empty data set. |mime_type| is mime type of the |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // If the sync promo NTP bubble is being shown. | 122 // If the sync promo NTP bubble is being shown. |
123 bool showing_sync_bubble_; | 123 bool showing_sync_bubble_; |
124 | 124 |
125 PrefChangeRegistrar pref_change_registrar_; | 125 PrefChangeRegistrar pref_change_registrar_; |
126 | 126 |
127 DISALLOW_COPY_AND_ASSIGN(NewTabUI); | 127 DISALLOW_COPY_AND_ASSIGN(NewTabUI); |
128 }; | 128 }; |
129 | 129 |
130 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ | 130 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
OLD | NEW |