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_PEPPER_BROKER_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // broker infobar and delegate and adds the infobar to the InfoBarService | 29 // broker infobar and delegate and adds the infobar to the InfoBarService |
30 // associated with |web_contents|. | 30 // associated with |web_contents|. |
31 static void Create(content::WebContents* web_contents, | 31 static void Create(content::WebContents* web_contents, |
32 const GURL& url, | 32 const GURL& url, |
33 const base::FilePath& plugin_path, | 33 const base::FilePath& plugin_path, |
34 const base::Callback<void(bool)>& callback); | 34 const base::Callback<void(bool)>& callback); |
35 | 35 |
36 private: | 36 private: |
37 PepperBrokerInfoBarDelegate(const GURL& url, | 37 PepperBrokerInfoBarDelegate(const GURL& url, |
38 const base::FilePath& plugin_path, | 38 const base::FilePath& plugin_path, |
39 const std::string& languages, | |
40 HostContentSettingsMap* content_settings, | 39 HostContentSettingsMap* content_settings, |
41 TabSpecificContentSettings* tab_content_settings, | 40 TabSpecificContentSettings* tab_content_settings, |
42 const base::Callback<void(bool)>& callback); | 41 const base::Callback<void(bool)>& callback); |
43 ~PepperBrokerInfoBarDelegate() override; | 42 ~PepperBrokerInfoBarDelegate() override; |
44 | 43 |
45 // ConfirmInfoBarDelegate: | 44 // ConfirmInfoBarDelegate: |
46 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | 45 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
47 int GetIconId() const override; | 46 int GetIconId() const override; |
48 base::string16 GetMessageText() const override; | 47 base::string16 GetMessageText() const override; |
49 base::string16 GetButtonLabel(InfoBarButton button) const override; | 48 base::string16 GetButtonLabel(InfoBarButton button) const override; |
50 bool Accept() override; | 49 bool Accept() override; |
51 bool Cancel() override; | 50 bool Cancel() override; |
52 base::string16 GetLinkText() const override; | 51 base::string16 GetLinkText() const override; |
53 GURL GetLinkURL() const override; | 52 GURL GetLinkURL() const override; |
54 | 53 |
55 void DispatchCallback(bool result); | 54 void DispatchCallback(bool result); |
56 | 55 |
57 const GURL url_; | 56 const GURL url_; |
58 const base::FilePath plugin_path_; | 57 const base::FilePath plugin_path_; |
59 const std::string languages_; | |
60 HostContentSettingsMap* content_settings_; | 58 HostContentSettingsMap* content_settings_; |
61 TabSpecificContentSettings* tab_content_settings_; | 59 TabSpecificContentSettings* tab_content_settings_; |
62 base::Callback<void(bool)> callback_; | 60 base::Callback<void(bool)> callback_; |
63 | 61 |
64 DISALLOW_COPY_AND_ASSIGN(PepperBrokerInfoBarDelegate); | 62 DISALLOW_COPY_AND_ASSIGN(PepperBrokerInfoBarDelegate); |
65 }; | 63 }; |
66 | 64 |
67 #endif // CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_ | 65 #endif // CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_ |
OLD | NEW |