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

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

Issue 13945023: Make URLDataSource::GetSource() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another one. 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698