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

Side by Side Diff: chrome/browser/ui/webui/about_ui.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ABOUT_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "content/public/browser/url_data_source.h" 12 #include "content/public/browser/url_data_source.h"
13 #include "content/public/browser/web_ui_controller.h" 13 #include "content/public/browser/web_ui_controller.h"
14 14
15 class Profile; 15 class Profile;
16 16
17 // We expose this class because the OOBE flow may need to explicitly add the 17 // We expose this class because the OOBE flow may need to explicitly add the
18 // chrome://terms source outside of the normal flow. 18 // chrome://terms source outside of the normal flow.
19 class AboutUIHTMLSource : public content::URLDataSource { 19 class AboutUIHTMLSource : public content::URLDataSource {
20 public: 20 public:
21 // Construct a data source for the specified |source_name|. 21 // Construct a data source for the specified |source_name|.
22 AboutUIHTMLSource(const std::string& source_name, Profile* profile); 22 AboutUIHTMLSource(const std::string& source_name, Profile* profile);
23 23
24 // content::URLDataSource implementation. 24 // content::URLDataSource implementation.
25 virtual std::string GetSource() const override; 25 std::string GetSource() const override;
26 virtual void StartDataRequest( 26 void StartDataRequest(
27 const std::string& path, 27 const std::string& path,
28 int render_process_id, 28 int render_process_id,
29 int render_frame_id, 29 int render_frame_id,
30 const content::URLDataSource::GotDataCallback& callback) override; 30 const content::URLDataSource::GotDataCallback& callback) override;
31 virtual std::string GetMimeType(const std::string& path) const override; 31 std::string GetMimeType(const std::string& path) const override;
32 virtual bool ShouldAddContentSecurityPolicy() const override; 32 bool ShouldAddContentSecurityPolicy() const override;
33 virtual bool ShouldDenyXFrameOptions() const override; 33 bool ShouldDenyXFrameOptions() const override;
34 34
35 // Send the response data. 35 // Send the response data.
36 void FinishDataRequest( 36 void FinishDataRequest(
37 const std::string& html, 37 const std::string& html,
38 const content::URLDataSource::GotDataCallback& callback); 38 const content::URLDataSource::GotDataCallback& callback);
39 39
40 Profile* profile() { return profile_; } 40 Profile* profile() { return profile_; }
41 41
42 private: 42 private:
43 virtual ~AboutUIHTMLSource(); 43 ~AboutUIHTMLSource() override;
44 44
45 std::string source_name_; 45 std::string source_name_;
46 Profile* profile_; 46 Profile* profile_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(AboutUIHTMLSource); 48 DISALLOW_COPY_AND_ASSIGN(AboutUIHTMLSource);
49 }; 49 };
50 50
51 class AboutUI : public content::WebUIController { 51 class AboutUI : public content::WebUIController {
52 public: 52 public:
53 explicit AboutUI(content::WebUI* web_ui, const std::string& host); 53 explicit AboutUI(content::WebUI* web_ui, const std::string& host);
54 virtual ~AboutUI() {} 54 ~AboutUI() override {}
55 55
56 private: 56 private:
57 DISALLOW_COPY_AND_ASSIGN(AboutUI); 57 DISALLOW_COPY_AND_ASSIGN(AboutUI);
58 }; 58 };
59 59
60 namespace about_ui { 60 namespace about_ui {
61 61
62 // Helper functions 62 // Helper functions
63 void AppendHeader(std::string* output, int refresh, 63 void AppendHeader(std::string* output, int refresh,
64 const std::string& unescaped_title); 64 const std::string& unescaped_title);
65 void AppendBody(std::string *output); 65 void AppendBody(std::string *output);
66 void AppendFooter(std::string *output); 66 void AppendFooter(std::string *output);
67 67
68 } // namespace about_ui 68 } // namespace about_ui
69 69
70 #endif // CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ 70 #endif // CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698