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_H_ | |
6 #define CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_ | |
7 | |
8 #include "base/logging.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/memory/weak_ptr.h" | |
benwells
2015/06/02 05:53:35
Is weak_ptr used?
dominickn (DO NOT USE)
2015/06/02 06:51:32
Done.
| |
11 #include "base/strings/string16.h" | |
12 #include "components/infobars/core/confirm_infobar_delegate.h" | |
13 #include "content/public/common/manifest.h" | |
14 #include "url/gurl.h" | |
benwells
2015/06/02 05:53:35
Is gurl used?
dominickn (DO NOT USE)
2015/06/02 06:51:32
Done.
| |
15 | |
16 class InfoBarService; | |
benwells
2015/06/02 05:53:35
This doesn't appear to be used either.
dominickn (DO NOT USE)
2015/06/02 06:51:32
Done.
| |
17 | |
18 namespace content { | |
19 class WebContents; | |
20 } // namespace content | |
21 | |
22 namespace extensions { | |
23 class BookmarkAppHelper; | |
24 class Extension; | |
25 } // namespace extensions | |
26 | |
27 namespace infobars { | |
28 class InfoBar; | |
29 } // namespace infobars | |
30 | |
31 namespace banners { | |
32 | |
33 class AppBannerDataFetcher; | |
34 | |
35 class AppBannerInfoBarDelegate : public ConfirmInfoBarDelegate { | |
benwells
2015/06/02 05:53:35
Can we make this AppBannerInfoBarDelegateDesktop (
dominickn (DO NOT USE)
2015/06/02 06:51:32
I feel like this should be connected to the decisi
| |
36 | |
37 public: | |
38 ~AppBannerInfoBarDelegate() override; | |
39 | |
40 static infobars::InfoBar* Create( | |
41 scoped_refptr<AppBannerDataFetcher> fetcher, | |
42 content::WebContents* web_contents, | |
43 const content::Manifest& web_app_data, | |
benwells
2015/06/02 05:53:35
We should call this web_manifest. web_app_data mak
dominickn (DO NOT USE)
2015/06/02 06:51:32
Done.
| |
44 extensions::BookmarkAppHelper* bookmark_app_helper, | |
45 int event_request_id); | |
46 | |
47 // ConfirmInfoBarDelegate overrides. | |
48 base::string16 GetMessageText() const override; | |
49 base::string16 GetButtonLabel(InfoBarButton button) const override; | |
50 | |
51 bool Accept() override; | |
52 bool Cancel() override; | |
53 | |
54 // InfoBarDelegate override. | |
55 void InfoBarDismissed() override; | |
56 | |
57 protected: | |
58 AppBannerInfoBarDelegate(scoped_refptr<AppBannerDataFetcher> fetcher, | |
benwells
2015/06/02 05:53:35
Is there a reason this is protected, not private?
dominickn (DO NOT USE)
2015/06/02 06:51:32
It was in case the delegate needed to be further s
| |
59 const content::Manifest& web_app_data, | |
60 extensions::BookmarkAppHelper* bookmark_app_helper, | |
61 int event_request_id); | |
62 | |
63 private: | |
64 scoped_refptr<AppBannerDataFetcher> fetcher_; | |
65 content::Manifest web_app_data_; | |
66 extensions::BookmarkAppHelper* bookmark_app_helper_; | |
67 int event_request_id_; | |
68 | |
69 Type GetInfoBarType() const override; | |
70 int GetIconID() const override; | |
71 }; | |
72 | |
73 } // namespace banners | |
74 | |
75 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_ | |
OLD | NEW |