| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ |
| 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "components/infobars/core/confirm_infobar_delegate.h" | 10 #include "components/infobars/core/confirm_infobar_delegate.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 static infobars::InfoBar* Create( | 35 static infobars::InfoBar* Create( |
| 36 scoped_refptr<AppBannerDataFetcherDesktop> fetcher, | 36 scoped_refptr<AppBannerDataFetcherDesktop> fetcher, |
| 37 content::WebContents* web_contents, | 37 content::WebContents* web_contents, |
| 38 const content::Manifest& web_manifest, | 38 const content::Manifest& web_manifest, |
| 39 extensions::BookmarkAppHelper* bookmark_app_helper, | 39 extensions::BookmarkAppHelper* bookmark_app_helper, |
| 40 int event_request_id); | 40 int event_request_id); |
| 41 | 41 |
| 42 // ConfirmInfoBarDelegate overrides. | 42 // ConfirmInfoBarDelegate overrides. |
| 43 base::string16 GetMessageText() const override; | 43 base::string16 GetMessageText() const override; |
| 44 int GetButtons() const override; |
| 44 base::string16 GetButtonLabel(InfoBarButton button) const override; | 45 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 45 | 46 |
| 46 bool Accept() override; | 47 bool Accept() override; |
| 47 bool Cancel() override; | |
| 48 | 48 |
| 49 // InfoBarDelegate override. | 49 // InfoBarDelegate override. |
| 50 void InfoBarDismissed() override; | 50 void InfoBarDismissed() override; |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 AppBannerInfoBarDelegateDesktop( | 53 AppBannerInfoBarDelegateDesktop( |
| 54 scoped_refptr<AppBannerDataFetcherDesktop> fetcher, | 54 scoped_refptr<AppBannerDataFetcherDesktop> fetcher, |
| 55 const content::Manifest& web_manifest, | 55 const content::Manifest& web_manifest, |
| 56 extensions::BookmarkAppHelper* bookmark_app_helper, | 56 extensions::BookmarkAppHelper* bookmark_app_helper, |
| 57 int event_request_id); | 57 int event_request_id); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 scoped_refptr<AppBannerDataFetcherDesktop> fetcher_; | 60 scoped_refptr<AppBannerDataFetcherDesktop> fetcher_; |
| 61 content::Manifest web_manifest_; | 61 content::Manifest web_manifest_; |
| 62 extensions::BookmarkAppHelper* bookmark_app_helper_; | 62 extensions::BookmarkAppHelper* bookmark_app_helper_; |
| 63 int event_request_id_; | 63 int event_request_id_; |
| 64 | 64 |
| 65 Type GetInfoBarType() const override; | 65 Type GetInfoBarType() const override; |
| 66 int GetIconID() const override; | 66 int GetIconID() const override; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateDesktop); | 68 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateDesktop); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace banners | 71 } // namespace banners |
| 72 | 72 |
| 73 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 73 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ |
| OLD | NEW |