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

Side by Side Diff: chrome/browser/plugins/plugin_infobar_delegates.h

Issue 624173002: replace OVERRIDE and FINAL with override and final in chrome/browser/[j-q]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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) 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_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_ 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_ 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "components/infobars/core/confirm_infobar_delegate.h" 9 #include "components/infobars/core/confirm_infobar_delegate.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
(...skipping 10 matching lines...) Expand all
21 class WebContents; 21 class WebContents;
22 } 22 }
23 23
24 // Base class for blocked plug-in infobars. 24 // Base class for blocked plug-in infobars.
25 class PluginInfoBarDelegate : public ConfirmInfoBarDelegate { 25 class PluginInfoBarDelegate : public ConfirmInfoBarDelegate {
26 protected: 26 protected:
27 explicit PluginInfoBarDelegate(const std::string& identifier); 27 explicit PluginInfoBarDelegate(const std::string& identifier);
28 virtual ~PluginInfoBarDelegate(); 28 virtual ~PluginInfoBarDelegate();
29 29
30 // ConfirmInfoBarDelegate: 30 // ConfirmInfoBarDelegate:
31 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; 31 virtual bool LinkClicked(WindowOpenDisposition disposition) override;
32 32
33 virtual std::string GetLearnMoreURL() const = 0; 33 virtual std::string GetLearnMoreURL() const = 0;
34 34
35 void LoadBlockedPlugins(); 35 void LoadBlockedPlugins();
36 36
37 private: 37 private:
38 // ConfirmInfoBarDelegate: 38 // ConfirmInfoBarDelegate:
39 virtual int GetIconID() const OVERRIDE; 39 virtual int GetIconID() const override;
40 virtual base::string16 GetLinkText() const OVERRIDE; 40 virtual base::string16 GetLinkText() const override;
41 41
42 std::string identifier_; 42 std::string identifier_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(PluginInfoBarDelegate); 44 DISALLOW_COPY_AND_ASSIGN(PluginInfoBarDelegate);
45 }; 45 };
46 46
47 // Infobar that's shown when a plug-in requires user authorization to run. 47 // Infobar that's shown when a plug-in requires user authorization to run.
48 class UnauthorizedPluginInfoBarDelegate : public PluginInfoBarDelegate { 48 class UnauthorizedPluginInfoBarDelegate : public PluginInfoBarDelegate {
49 public: 49 public:
50 // Creates an unauthorized plugin infobar and delegate and adds the infobar to 50 // Creates an unauthorized plugin infobar and delegate and adds the infobar to
51 // |infobar_service|. 51 // |infobar_service|.
52 static void Create(InfoBarService* infobar_service, 52 static void Create(InfoBarService* infobar_service,
53 HostContentSettingsMap* content_settings, 53 HostContentSettingsMap* content_settings,
54 const base::string16& name, 54 const base::string16& name,
55 const std::string& identifier); 55 const std::string& identifier);
56 56
57 private: 57 private:
58 UnauthorizedPluginInfoBarDelegate(HostContentSettingsMap* content_settings, 58 UnauthorizedPluginInfoBarDelegate(HostContentSettingsMap* content_settings,
59 const base::string16& name, 59 const base::string16& name,
60 const std::string& identifier); 60 const std::string& identifier);
61 virtual ~UnauthorizedPluginInfoBarDelegate(); 61 virtual ~UnauthorizedPluginInfoBarDelegate();
62 62
63 // PluginInfoBarDelegate: 63 // PluginInfoBarDelegate:
64 virtual base::string16 GetMessageText() const OVERRIDE; 64 virtual base::string16 GetMessageText() const override;
65 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 65 virtual base::string16 GetButtonLabel(InfoBarButton button) const override;
66 virtual bool Accept() OVERRIDE; 66 virtual bool Accept() override;
67 virtual bool Cancel() OVERRIDE; 67 virtual bool Cancel() override;
68 virtual void InfoBarDismissed() OVERRIDE; 68 virtual void InfoBarDismissed() override;
69 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; 69 virtual bool LinkClicked(WindowOpenDisposition disposition) override;
70 virtual std::string GetLearnMoreURL() const OVERRIDE; 70 virtual std::string GetLearnMoreURL() const override;
71 71
72 HostContentSettingsMap* content_settings_; 72 HostContentSettingsMap* content_settings_;
73 base::string16 name_; 73 base::string16 name_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(UnauthorizedPluginInfoBarDelegate); 75 DISALLOW_COPY_AND_ASSIGN(UnauthorizedPluginInfoBarDelegate);
76 }; 76 };
77 77
78 #if defined(ENABLE_PLUGIN_INSTALLATION) 78 #if defined(ENABLE_PLUGIN_INSTALLATION)
79 // Infobar that's shown when a plug-in is out of date. 79 // Infobar that's shown when a plug-in is out of date.
80 class OutdatedPluginInfoBarDelegate : public PluginInfoBarDelegate, 80 class OutdatedPluginInfoBarDelegate : public PluginInfoBarDelegate,
81 public WeakPluginInstallerObserver { 81 public WeakPluginInstallerObserver {
82 public: 82 public:
83 // Creates an outdated plugin infobar and delegate and adds the infobar to 83 // Creates an outdated plugin infobar and delegate and adds the infobar to
84 // |infobar_service|. 84 // |infobar_service|.
85 static void Create(InfoBarService* infobar_service, 85 static void Create(InfoBarService* infobar_service,
86 PluginInstaller* installer, 86 PluginInstaller* installer,
87 scoped_ptr<PluginMetadata> metadata); 87 scoped_ptr<PluginMetadata> metadata);
88 88
89 private: 89 private:
90 OutdatedPluginInfoBarDelegate(PluginInstaller* installer, 90 OutdatedPluginInfoBarDelegate(PluginInstaller* installer,
91 scoped_ptr<PluginMetadata> metadata, 91 scoped_ptr<PluginMetadata> metadata,
92 const base::string16& message); 92 const base::string16& message);
93 virtual ~OutdatedPluginInfoBarDelegate(); 93 virtual ~OutdatedPluginInfoBarDelegate();
94 94
95 // PluginInfoBarDelegate: 95 // PluginInfoBarDelegate:
96 virtual base::string16 GetMessageText() const OVERRIDE; 96 virtual base::string16 GetMessageText() const override;
97 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 97 virtual base::string16 GetButtonLabel(InfoBarButton button) const override;
98 virtual bool Accept() OVERRIDE; 98 virtual bool Accept() override;
99 virtual bool Cancel() OVERRIDE; 99 virtual bool Cancel() override;
100 virtual void InfoBarDismissed() OVERRIDE; 100 virtual void InfoBarDismissed() override;
101 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; 101 virtual bool LinkClicked(WindowOpenDisposition disposition) override;
102 virtual std::string GetLearnMoreURL() const OVERRIDE; 102 virtual std::string GetLearnMoreURL() const override;
103 103
104 // PluginInstallerObserver: 104 // PluginInstallerObserver:
105 virtual void DownloadStarted() OVERRIDE; 105 virtual void DownloadStarted() override;
106 virtual void DownloadError(const std::string& message) OVERRIDE; 106 virtual void DownloadError(const std::string& message) override;
107 virtual void DownloadCancelled() OVERRIDE; 107 virtual void DownloadCancelled() override;
108 virtual void DownloadFinished() OVERRIDE; 108 virtual void DownloadFinished() override;
109 109
110 // WeakPluginInstallerObserver: 110 // WeakPluginInstallerObserver:
111 virtual void OnlyWeakObserversLeft() OVERRIDE; 111 virtual void OnlyWeakObserversLeft() override;
112 112
113 // Replaces this infobar with one showing |message|. The new infobar will 113 // Replaces this infobar with one showing |message|. The new infobar will
114 // not have any buttons (and not call the callback). 114 // not have any buttons (and not call the callback).
115 void ReplaceWithInfoBar(const base::string16& message); 115 void ReplaceWithInfoBar(const base::string16& message);
116 116
117 scoped_ptr<PluginMetadata> plugin_metadata_; 117 scoped_ptr<PluginMetadata> plugin_metadata_;
118 118
119 base::string16 message_; 119 base::string16 message_;
120 120
121 DISALLOW_COPY_AND_ASSIGN(OutdatedPluginInfoBarDelegate); 121 DISALLOW_COPY_AND_ASSIGN(OutdatedPluginInfoBarDelegate);
(...skipping 25 matching lines...) Expand all
147 147
148 private: 148 private:
149 PluginInstallerInfoBarDelegate(PluginInstaller* installer, 149 PluginInstallerInfoBarDelegate(PluginInstaller* installer,
150 scoped_ptr<PluginMetadata> metadata, 150 scoped_ptr<PluginMetadata> metadata,
151 const InstallCallback& callback, 151 const InstallCallback& callback,
152 bool new_install, 152 bool new_install,
153 const base::string16& message); 153 const base::string16& message);
154 virtual ~PluginInstallerInfoBarDelegate(); 154 virtual ~PluginInstallerInfoBarDelegate();
155 155
156 // ConfirmInfoBarDelegate: 156 // ConfirmInfoBarDelegate:
157 virtual int GetIconID() const OVERRIDE; 157 virtual int GetIconID() const override;
158 virtual base::string16 GetMessageText() const OVERRIDE; 158 virtual base::string16 GetMessageText() const override;
159 virtual int GetButtons() const OVERRIDE; 159 virtual int GetButtons() const override;
160 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 160 virtual base::string16 GetButtonLabel(InfoBarButton button) const override;
161 virtual bool Accept() OVERRIDE; 161 virtual bool Accept() override;
162 virtual base::string16 GetLinkText() const OVERRIDE; 162 virtual base::string16 GetLinkText() const override;
163 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; 163 virtual bool LinkClicked(WindowOpenDisposition disposition) override;
164 164
165 // PluginInstallerObserver: 165 // PluginInstallerObserver:
166 virtual void DownloadStarted() OVERRIDE; 166 virtual void DownloadStarted() override;
167 virtual void DownloadError(const std::string& message) OVERRIDE; 167 virtual void DownloadError(const std::string& message) override;
168 virtual void DownloadCancelled() OVERRIDE; 168 virtual void DownloadCancelled() override;
169 virtual void DownloadFinished() OVERRIDE; 169 virtual void DownloadFinished() override;
170 170
171 // WeakPluginInstallerObserver: 171 // WeakPluginInstallerObserver:
172 virtual void OnlyWeakObserversLeft() OVERRIDE; 172 virtual void OnlyWeakObserversLeft() override;
173 173
174 // Replaces this infobar with one showing |message|. The new infobar will 174 // Replaces this infobar with one showing |message|. The new infobar will
175 // not have any buttons (and not call the callback). 175 // not have any buttons (and not call the callback).
176 void ReplaceWithInfoBar(const base::string16& message); 176 void ReplaceWithInfoBar(const base::string16& message);
177 177
178 scoped_ptr<PluginMetadata> plugin_metadata_; 178 scoped_ptr<PluginMetadata> plugin_metadata_;
179 179
180 InstallCallback callback_; 180 InstallCallback callback_;
181 181
182 // True iff the plug-in isn't installed yet. 182 // True iff the plug-in isn't installed yet.
(...skipping 20 matching lines...) Expand all
203 // |infobar_service|. 203 // |infobar_service|.
204 static void Create(InfoBarService* infobar_service, 204 static void Create(InfoBarService* infobar_service,
205 Mode mode, 205 Mode mode,
206 const base::string16& name); 206 const base::string16& name);
207 207
208 private: 208 private:
209 PluginMetroModeInfoBarDelegate(Mode mode, const base::string16& name); 209 PluginMetroModeInfoBarDelegate(Mode mode, const base::string16& name);
210 virtual ~PluginMetroModeInfoBarDelegate(); 210 virtual ~PluginMetroModeInfoBarDelegate();
211 211
212 // ConfirmInfoBarDelegate: 212 // ConfirmInfoBarDelegate:
213 virtual int GetIconID() const OVERRIDE; 213 virtual int GetIconID() const override;
214 virtual base::string16 GetMessageText() const OVERRIDE; 214 virtual base::string16 GetMessageText() const override;
215 virtual int GetButtons() const OVERRIDE; 215 virtual int GetButtons() const override;
216 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 216 virtual base::string16 GetButtonLabel(InfoBarButton button) const override;
217 virtual bool Accept() OVERRIDE; 217 virtual bool Accept() override;
218 virtual base::string16 GetLinkText() const OVERRIDE; 218 virtual base::string16 GetLinkText() const override;
219 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; 219 virtual bool LinkClicked(WindowOpenDisposition disposition) override;
220 220
221 const Mode mode_; 221 const Mode mode_;
222 const base::string16 name_; 222 const base::string16 name_;
223 223
224 DISALLOW_COPY_AND_ASSIGN(PluginMetroModeInfoBarDelegate); 224 DISALLOW_COPY_AND_ASSIGN(PluginMetroModeInfoBarDelegate);
225 }; 225 };
226 #endif // defined(OS_WIN) 226 #endif // defined(OS_WIN)
227 227
228 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_ 228 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter_unittest.cc ('k') | chrome/browser/plugins/plugin_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698