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/api/infobars/confirm_infobar_delegate.h" | 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 DISALLOW_COPY_AND_ASSIGN(PluginInstallerInfoBarDelegate); | 179 DISALLOW_COPY_AND_ASSIGN(PluginInstallerInfoBarDelegate); |
180 }; | 180 }; |
181 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 181 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
182 | 182 |
183 #if defined(OS_WIN) | 183 #if defined(OS_WIN) |
184 class PluginMetroModeInfoBarDelegate : public ConfirmInfoBarDelegate { | 184 class PluginMetroModeInfoBarDelegate : public ConfirmInfoBarDelegate { |
185 public: | 185 public: |
186 // Shows an infobar asking the user to switch to desktop chrome if they | 186 // Shows an infobar asking the user to switch to desktop chrome if they |
187 // want to use the plugin. | 187 // want to use the plugin. |
188 static InfoBarDelegate* Create(InfoBarService* infobar_service, | 188 PluginMetroModeInfoBarDelegate(InfoBarService* infobar_service, |
189 const string16& plugin_name); | 189 const string16& plugin_name, |
| 190 const string16& ok_label); |
190 private: | 191 private: |
191 PluginMetroModeInfoBarDelegate(InfoBarService* infobar_service, | |
192 const string16& message); | |
193 virtual ~PluginMetroModeInfoBarDelegate(); | 192 virtual ~PluginMetroModeInfoBarDelegate(); |
194 | 193 |
195 // ConfirmInfoBarDelegate: | 194 // ConfirmInfoBarDelegate: |
196 virtual gfx::Image* GetIcon() const OVERRIDE; | 195 virtual gfx::Image* GetIcon() const OVERRIDE; |
197 virtual string16 GetMessageText() const OVERRIDE; | 196 virtual string16 GetMessageText() const OVERRIDE; |
198 virtual int GetButtons() const OVERRIDE; | 197 virtual int GetButtons() const OVERRIDE; |
199 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 198 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
200 virtual bool Accept() OVERRIDE; | 199 virtual bool Accept() OVERRIDE; |
201 virtual string16 GetLinkText() const OVERRIDE; | 200 virtual string16 GetLinkText() const OVERRIDE; |
202 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 201 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
203 | 202 |
204 string16 message_; | 203 string16 message_; |
| 204 string16 ok_label_; |
205 | 205 |
206 DISALLOW_COPY_AND_ASSIGN(PluginMetroModeInfoBarDelegate); | 206 DISALLOW_COPY_AND_ASSIGN(PluginMetroModeInfoBarDelegate); |
207 }; | 207 }; |
208 #endif // defined(OS_WIN) | 208 #endif // defined(OS_WIN) |
209 | 209 |
210 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_ | 210 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_ |
OLD | NEW |