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.
5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_
6 #define CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_
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"
15 } // namespace content
17 namespace extensions
{
18 class BookmarkAppHelper
;
20 } // namespace extensions
24 } // namespace infobars
28 class AppBannerDataFetcherDesktop
;
30 class AppBannerInfoBarDelegateDesktop
: public ConfirmInfoBarDelegate
{
33 ~AppBannerInfoBarDelegateDesktop() override
;
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
);
42 // ConfirmInfoBarDelegate overrides.
43 base::string16
GetMessageText() const override
;
44 int GetButtons() const override
;
45 base::string16
GetButtonLabel(InfoBarButton button
) const override
;
47 bool Accept() override
;
49 // InfoBarDelegate override.
50 void InfoBarDismissed() override
;
53 AppBannerInfoBarDelegateDesktop(
54 scoped_refptr
<AppBannerDataFetcherDesktop
> fetcher
,
55 const content::Manifest
& web_manifest
,
56 extensions::BookmarkAppHelper
* bookmark_app_helper
,
57 int event_request_id
);
60 scoped_refptr
<AppBannerDataFetcherDesktop
> fetcher_
;
61 content::Manifest web_manifest_
;
62 extensions::BookmarkAppHelper
* bookmark_app_helper_
;
63 int event_request_id_
;
64 bool has_user_interaction_
;
66 Type
GetInfoBarType() const override
;
67 int GetIconID() const override
;
69 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateDesktop
);
72 } // namespace banners
74 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_