Chromium Code Reviews| Index: chrome/browser/banners/app_banner_infobar_delegate.h |
| diff --git a/chrome/browser/banners/app_banner_infobar_delegate.h b/chrome/browser/banners/app_banner_infobar_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..972069815b6d59e2884fce7e6426559f989832be |
| --- /dev/null |
| +++ b/chrome/browser/banners/app_banner_infobar_delegate.h |
| @@ -0,0 +1,75 @@ |
| +// 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_H_ |
| +#define CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_ |
| + |
| +#include "base/logging.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#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.
|
| +#include "base/strings/string16.h" |
| +#include "components/infobars/core/confirm_infobar_delegate.h" |
| +#include "content/public/common/manifest.h" |
| +#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.
|
| + |
| +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.
|
| + |
| +namespace content { |
| +class WebContents; |
| +} // namespace content |
| + |
| +namespace extensions { |
| +class BookmarkAppHelper; |
| +class Extension; |
| +} // namespace extensions |
| + |
| +namespace infobars { |
| +class InfoBar; |
| +} // namespace infobars |
| + |
| +namespace banners { |
| + |
| +class AppBannerDataFetcher; |
| + |
| +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
|
| + |
| + public: |
| + ~AppBannerInfoBarDelegate() override; |
| + |
| + static infobars::InfoBar* Create( |
| + scoped_refptr<AppBannerDataFetcher> fetcher, |
| + content::WebContents* web_contents, |
| + 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.
|
| + extensions::BookmarkAppHelper* bookmark_app_helper, |
| + int event_request_id); |
| + |
| + // ConfirmInfoBarDelegate overrides. |
| + base::string16 GetMessageText() const override; |
| + base::string16 GetButtonLabel(InfoBarButton button) const override; |
| + |
| + bool Accept() override; |
| + bool Cancel() override; |
| + |
| + // InfoBarDelegate override. |
| + void InfoBarDismissed() override; |
| + |
| + protected: |
| + 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
|
| + const content::Manifest& web_app_data, |
| + extensions::BookmarkAppHelper* bookmark_app_helper, |
| + int event_request_id); |
| + |
| + private: |
| + scoped_refptr<AppBannerDataFetcher> fetcher_; |
| + content::Manifest web_app_data_; |
| + extensions::BookmarkAppHelper* bookmark_app_helper_; |
| + int event_request_id_; |
| + |
| + Type GetInfoBarType() const override; |
| + int GetIconID() const override; |
| +}; |
| + |
| +} // namespace banners |
| + |
| +#endif // CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_ |