Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "base/file_path.h" | |
| 10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | |
| 11 #include "googleurl/src/gurl.h" | |
| 12 | |
| 13 class HostContentSettingsMap; | |
| 14 class InfoBarTabHelper; | |
| 15 | |
| 16 namespace content { | |
| 17 class WebContents; | |
| 18 } | |
| 19 | |
| 20 class PepperBrokerInfoBarDelegate : public ConfirmInfoBarDelegate { | |
|
sky
2012/11/16 21:48:30
Add description.
Bernhard Bauer
2012/11/19 08:55:17
Done.
| |
| 21 public: | |
| 22 static void Show( | |
| 23 content::WebContents* web_contents, | |
| 24 const GURL& url, | |
| 25 const FilePath& plugin_path, | |
| 26 const base::Callback<void(bool)>& callback); | |
| 27 | |
| 28 virtual ~PepperBrokerInfoBarDelegate(); | |
|
sky
2012/11/16 21:48:30
constructor/destructor before other methods.
Bernhard Bauer
2012/11/19 08:55:17
Done.
| |
| 29 | |
| 30 // ConfirmInfoBarDelegate: | |
| 31 virtual string16 GetMessageText() const OVERRIDE; | |
| 32 virtual int GetButtons() const OVERRIDE; | |
| 33 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | |
| 34 virtual bool Accept() OVERRIDE; | |
| 35 virtual bool Cancel() OVERRIDE; | |
| 36 virtual string16 GetLinkText() const OVERRIDE; | |
| 37 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | |
| 38 virtual gfx::Image* GetIcon() const OVERRIDE; | |
| 39 | |
| 40 private: | |
| 41 PepperBrokerInfoBarDelegate( | |
| 42 InfoBarTabHelper* helper, | |
| 43 const GURL& url, | |
| 44 const FilePath& plugin_path, | |
| 45 const std::string& languages, | |
| 46 HostContentSettingsMap* content_settings, | |
| 47 const base::Callback<void(bool)>& callback); | |
| 48 | |
| 49 void DispatchCallback(bool result); | |
| 50 | |
| 51 const GURL url_; | |
| 52 const FilePath plugin_path_; | |
| 53 const std::string languages_; | |
| 54 HostContentSettingsMap* content_settings_; | |
| 55 base::Callback<void(bool)> callback_; | |
| 56 | |
| 57 DISALLOW_COPY_AND_ASSIGN(PepperBrokerInfoBarDelegate); | |
| 58 }; | |
| 59 | |
| 60 #endif // CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_ | |
| OLD | NEW |