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