OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 WebContents; | 10 class WebContents; |
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(WebContents* web_contents); | 16 explicit PluginInstaller(WebContents* web_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 private: | 23 private: |
23 // Overridden from ConfirmInfoBarDelegate: | 24 // Overridden from ConfirmInfoBarDelegate: |
24 virtual std::wstring GetMessageText() const; | 25 virtual std::wstring GetMessageText() const; |
25 virtual SkBitmap* GetIcon() const; | 26 virtual SkBitmap* GetIcon() const; |
26 virtual int GetButtons() const; | 27 virtual int GetButtons() const; |
27 virtual std::wstring GetButtonLabel(InfoBarButton button) const; | 28 virtual std::wstring GetButtonLabel(InfoBarButton button) const; |
28 virtual bool Accept(); | 29 virtual bool Accept(); |
29 | 30 |
30 // The containing WebContents | 31 // The containing WebContents |
31 WebContents* web_contents_; | 32 WebContents* web_contents_; |
32 | 33 |
33 DISALLOW_EVIL_CONSTRUCTORS(PluginInstaller); | 34 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); |
34 }; | 35 }; |
35 | 36 |
36 #endif | 37 #endif // CHROME_BROWSER_PLUGIN_INSTALLER_H_ |
OLD | NEW |