| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 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 | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 
|  | 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 
|  | 7 | 
|  | 8 #include "base/memory/scoped_ptr.h" | 
|  | 9 #include "base/strings/string16.h" | 
|  | 10 #include "components/infobars/core/confirm_infobar_delegate.h" | 
|  | 11 #include "content/public/common/manifest.h" | 
|  | 12 | 
|  | 13 namespace content { | 
|  | 14 class WebContents; | 
|  | 15 }  // namespace content | 
|  | 16 | 
|  | 17 namespace extensions { | 
|  | 18 class BookmarkAppHelper; | 
|  | 19 class Extension; | 
|  | 20 }  // namespace extensions | 
|  | 21 | 
|  | 22 namespace infobars { | 
|  | 23 class InfoBar; | 
|  | 24 }  // namespace infobars | 
|  | 25 | 
|  | 26 namespace banners { | 
|  | 27 | 
|  | 28 class AppBannerDataFetcherDesktop; | 
|  | 29 | 
|  | 30 class AppBannerInfoBarDelegateDesktop : public ConfirmInfoBarDelegate { | 
|  | 31 | 
|  | 32  public: | 
|  | 33   ~AppBannerInfoBarDelegateDesktop() override; | 
|  | 34 | 
|  | 35   static infobars::InfoBar* Create( | 
|  | 36       scoped_refptr<AppBannerDataFetcherDesktop> fetcher, | 
|  | 37       content::WebContents* web_contents, | 
|  | 38       const content::Manifest& web_manifest, | 
|  | 39       extensions::BookmarkAppHelper* bookmark_app_helper, | 
|  | 40       int event_request_id); | 
|  | 41 | 
|  | 42   // ConfirmInfoBarDelegate overrides. | 
|  | 43   base::string16 GetMessageText() const override; | 
|  | 44   base::string16 GetButtonLabel(InfoBarButton button) const override; | 
|  | 45 | 
|  | 46   bool Accept() override; | 
|  | 47   bool Cancel() override; | 
|  | 48 | 
|  | 49   // InfoBarDelegate override. | 
|  | 50   void InfoBarDismissed() override; | 
|  | 51 | 
|  | 52  protected: | 
|  | 53   AppBannerInfoBarDelegateDesktop( | 
|  | 54       scoped_refptr<AppBannerDataFetcherDesktop> fetcher, | 
|  | 55       const content::Manifest& web_manifest, | 
|  | 56       extensions::BookmarkAppHelper* bookmark_app_helper, | 
|  | 57       int event_request_id); | 
|  | 58 | 
|  | 59  private: | 
|  | 60   scoped_refptr<AppBannerDataFetcherDesktop> fetcher_; | 
|  | 61   content::Manifest web_manifest_; | 
|  | 62   extensions::BookmarkAppHelper* bookmark_app_helper_; | 
|  | 63   int event_request_id_; | 
|  | 64 | 
|  | 65   Type GetInfoBarType() const override; | 
|  | 66   int GetIconID() const override; | 
|  | 67 | 
|  | 68   DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateDesktop); | 
|  | 69 }; | 
|  | 70 | 
|  | 71 }  // namespace banners | 
|  | 72 | 
|  | 73 #endif  // CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 
| OLD | NEW | 
|---|