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

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

Issue 2875943003: Cleanup: Remove dead code in NewTabUI (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | 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 <map>
9 #include <string> 8 #include <string>
Dan Beam 2017/05/11 17:37:40 one might argue you could remove this as well...
Marc Treib 2017/05/12 08:38:39 Because it's only mentioned as part of overridden
10 9
11 #include "base/macros.h" 10 #include "base/macros.h"
12 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
13 #include "components/prefs/pref_change_registrar.h" 12 #include "components/prefs/pref_change_registrar.h"
14 #include "content/public/browser/url_data_source.h" 13 #include "content/public/browser/url_data_source.h"
15 #include "content/public/browser/web_ui_controller.h" 14 #include "content/public/browser/web_ui_controller.h"
16 15
17 class GURL; 16 class GURL;
18 class Profile; 17 class Profile;
19 18
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const std::string& path, 64 const std::string& path,
66 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 65 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
67 const content::URLDataSource::GotDataCallback& callback) override; 66 const content::URLDataSource::GotDataCallback& callback) override;
68 std::string GetMimeType(const std::string&) const override; 67 std::string GetMimeType(const std::string&) const override;
69 bool ShouldReplaceExistingSource() const override; 68 bool ShouldReplaceExistingSource() const override;
70 std::string GetContentSecurityPolicyScriptSrc() const override; 69 std::string GetContentSecurityPolicyScriptSrc() const override;
71 std::string GetContentSecurityPolicyStyleSrc() const override; 70 std::string GetContentSecurityPolicyStyleSrc() const override;
72 std::string GetContentSecurityPolicyImgSrc() const override; 71 std::string GetContentSecurityPolicyImgSrc() const override;
73 std::string GetContentSecurityPolicyChildSrc() const override; 72 std::string GetContentSecurityPolicyChildSrc() const override;
74 73
75 // Adds |resource| to the source. |resource_id| is resource id or 0,
76 // which means return empty data set. |mime_type| is mime type of the
77 // resource.
78 void AddResource(const char* resource,
79 const char* mime_type,
80 int resource_id);
81
82 private: 74 private:
83 // Pointer back to the original profile. 75 // Pointer back to the original profile.
84 Profile* profile_; 76 Profile* profile_;
85 77
86 // Maps resource files to mime types an resource ids.
87 std::map<std::string, std::pair<std::string, int> > resource_map_;
88
89 DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource); 78 DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource);
90 }; 79 };
91 80
92 void OnShowBookmarkBarChanged(); 81 void OnShowBookmarkBarChanged();
93 82
94 Profile* GetProfile() const; 83 Profile* GetProfile() const;
95 84
96 PrefChangeRegistrar pref_change_registrar_; 85 PrefChangeRegistrar pref_change_registrar_;
97 86
98 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 87 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
99 }; 88 };
100 89
101 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ 90 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698