OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PLUGIN_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_PLUGIN_INSTALLER_H_ |
6 #define CHROME_BROWSER_PLUGIN_INSTALLER_H_ | 6 #define CHROME_BROWSER_PLUGIN_INSTALLER_H_ |
7 | 7 |
8 #include "chrome/browser/tab_contents/infobar_delegate.h" | 8 #include "chrome/browser/tab_contents/infobar_delegate.h" |
9 | 9 |
10 class TabContents; | 10 class TabContents; |
11 | 11 |
12 // The main purpose for this class is to popup/close the infobar when there is | 12 // The main purpose for this class is to popup/close the infobar when there is |
13 // a missing plugin. | 13 // a missing plugin. |
14 class PluginInstaller : public ConfirmInfoBarDelegate { | 14 class PluginInstaller : public ConfirmInfoBarDelegate { |
15 public: | 15 public: |
16 explicit PluginInstaller(TabContents* tab_contents); | 16 explicit PluginInstaller(TabContents* tab_contents); |
17 ~PluginInstaller(); | 17 ~PluginInstaller(); |
18 | 18 |
19 void OnMissingPluginStatus(int status); | 19 void OnMissingPluginStatus(int status); |
20 // A new page starts loading. This is the perfect time to close the info bar. | 20 // A new page starts loading. This is the perfect time to close the info bar. |
21 void OnStartLoading(); | 21 void OnStartLoading(); |
22 | 22 |
23 private: | 23 private: |
24 // Overridden from ConfirmInfoBarDelegate: | 24 // Overridden from ConfirmInfoBarDelegate: |
25 virtual std::wstring GetMessageText() const; | 25 virtual std::wstring GetMessageText() const; |
26 virtual SkBitmap* GetIcon() const; | 26 virtual SkBitmap* GetIcon() const; |
27 virtual int GetButtons() const; | 27 virtual int GetButtons() const; |
28 virtual std::wstring GetButtonLabel(InfoBarButton button) const; | 28 virtual std::wstring GetButtonLabel(InfoBarButton button) const; |
29 virtual bool Accept(); | 29 virtual bool Accept(); |
| 30 virtual std::wstring GetLinkText(); |
| 31 virtual bool LinkClicked(WindowOpenDisposition disposition); |
30 | 32 |
31 // The containing TabContents | 33 // The containing TabContents |
32 TabContents* tab_contents_; | 34 TabContents* tab_contents_; |
33 | 35 |
34 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); | 36 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); |
35 }; | 37 }; |
36 | 38 |
37 #endif // CHROME_BROWSER_PLUGIN_INSTALLER_H_ | 39 #endif // CHROME_BROWSER_PLUGIN_INSTALLER_H_ |
OLD | NEW |