| 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_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 "chrome/browser/infobars/confirm_infobar_delegate.h" | 9 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 35 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
| 36 | 36 |
| 37 virtual std::string GetLearnMoreURL() const = 0; | 37 virtual std::string GetLearnMoreURL() const = 0; |
| 38 | 38 |
| 39 void LoadBlockedPlugins(); | 39 void LoadBlockedPlugins(); |
| 40 | 40 |
| 41 string16 name_; | 41 string16 name_; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 // ConfirmInfoBarDelegate: | 44 // ConfirmInfoBarDelegate: |
| 45 virtual gfx::Image* GetIcon() const OVERRIDE; | 45 virtual int GetIconID() const OVERRIDE; |
| 46 virtual string16 GetLinkText() const OVERRIDE; | 46 virtual string16 GetLinkText() const OVERRIDE; |
| 47 | 47 |
| 48 std::string identifier_; | 48 std::string identifier_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(PluginInfoBarDelegate); | 50 DISALLOW_COPY_AND_ASSIGN(PluginInfoBarDelegate); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // Infobar that's shown when a plug-in requires user authorization to run. | 53 // Infobar that's shown when a plug-in requires user authorization to run. |
| 54 class UnauthorizedPluginInfoBarDelegate : public PluginInfoBarDelegate { | 54 class UnauthorizedPluginInfoBarDelegate : public PluginInfoBarDelegate { |
| 55 public: | 55 public: |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 private: | 153 private: |
| 154 PluginInstallerInfoBarDelegate(InfoBarService* infobar_service, | 154 PluginInstallerInfoBarDelegate(InfoBarService* infobar_service, |
| 155 PluginInstaller* installer, | 155 PluginInstaller* installer, |
| 156 scoped_ptr<PluginMetadata> plugin_metadata, | 156 scoped_ptr<PluginMetadata> plugin_metadata, |
| 157 const InstallCallback& callback, | 157 const InstallCallback& callback, |
| 158 bool new_install, | 158 bool new_install, |
| 159 const string16& message); | 159 const string16& message); |
| 160 virtual ~PluginInstallerInfoBarDelegate(); | 160 virtual ~PluginInstallerInfoBarDelegate(); |
| 161 | 161 |
| 162 // ConfirmInfoBarDelegate: | 162 // ConfirmInfoBarDelegate: |
| 163 virtual gfx::Image* GetIcon() const OVERRIDE; | 163 virtual int GetIconID() const OVERRIDE; |
| 164 virtual string16 GetMessageText() const OVERRIDE; | 164 virtual string16 GetMessageText() const OVERRIDE; |
| 165 virtual int GetButtons() const OVERRIDE; | 165 virtual int GetButtons() const OVERRIDE; |
| 166 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 166 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| 167 virtual bool Accept() OVERRIDE; | 167 virtual bool Accept() OVERRIDE; |
| 168 virtual string16 GetLinkText() const OVERRIDE; | 168 virtual string16 GetLinkText() const OVERRIDE; |
| 169 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 169 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
| 170 | 170 |
| 171 // PluginInstallerObserver: | 171 // PluginInstallerObserver: |
| 172 virtual void DownloadStarted() OVERRIDE; | 172 virtual void DownloadStarted() OVERRIDE; |
| 173 virtual void DownloadError(const std::string& message) OVERRIDE; | 173 virtual void DownloadError(const std::string& message) OVERRIDE; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 Mode mode, | 211 Mode mode, |
| 212 const string16& name); | 212 const string16& name); |
| 213 | 213 |
| 214 private: | 214 private: |
| 215 PluginMetroModeInfoBarDelegate(InfoBarService* infobar_service, | 215 PluginMetroModeInfoBarDelegate(InfoBarService* infobar_service, |
| 216 Mode mode, | 216 Mode mode, |
| 217 const string16& name); | 217 const string16& name); |
| 218 virtual ~PluginMetroModeInfoBarDelegate(); | 218 virtual ~PluginMetroModeInfoBarDelegate(); |
| 219 | 219 |
| 220 // ConfirmInfoBarDelegate: | 220 // ConfirmInfoBarDelegate: |
| 221 virtual gfx::Image* GetIcon() const OVERRIDE; | 221 virtual int GetIconID() const OVERRIDE; |
| 222 virtual string16 GetMessageText() const OVERRIDE; | 222 virtual string16 GetMessageText() const OVERRIDE; |
| 223 virtual int GetButtons() const OVERRIDE; | 223 virtual int GetButtons() const OVERRIDE; |
| 224 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 224 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| 225 virtual bool Accept() OVERRIDE; | 225 virtual bool Accept() OVERRIDE; |
| 226 virtual bool Cancel() OVERRIDE; | 226 virtual bool Cancel() OVERRIDE; |
| 227 virtual string16 GetLinkText() const OVERRIDE; | 227 virtual string16 GetLinkText() const OVERRIDE; |
| 228 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 228 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
| 229 | 229 |
| 230 const Mode mode_; | 230 const Mode mode_; |
| 231 const string16 name_; | 231 const string16 name_; |
| 232 | 232 |
| 233 DISALLOW_COPY_AND_ASSIGN(PluginMetroModeInfoBarDelegate); | 233 DISALLOW_COPY_AND_ASSIGN(PluginMetroModeInfoBarDelegate); |
| 234 }; | 234 }; |
| 235 #endif // defined(OS_WIN) | 235 #endif // defined(OS_WIN) |
| 236 | 236 |
| 237 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_ | 237 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_ |
| OLD | NEW |