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