Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Unified Diff: chrome/browser/banners/app_banner_infobar_delegate_desktop.h

Issue 1161233005: Implement app banner info bars on desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stop-icon-overgeneration
Patch Set: Moving feature enabling to existing #ifs Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/banners/app_banner_infobar_delegate_desktop.h
diff --git a/chrome/browser/banners/app_banner_infobar_delegate_desktop.h b/chrome/browser/banners/app_banner_infobar_delegate_desktop.h
new file mode 100644
index 0000000000000000000000000000000000000000..61d29730bfcb6124742c3c5324a701739a8d8a16
--- /dev/null
+++ b/chrome/browser/banners/app_banner_infobar_delegate_desktop.h
@@ -0,0 +1,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;
+ base::string16 GetButtonLabel(InfoBarButton button) const override;
+
+ bool Accept() override;
+ bool Cancel() 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_

Powered by Google App Engine
This is Rietveld 408576698