| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ |
| 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 class AppBannerManager; | 28 class AppBannerManager; |
| 29 | 29 |
| 30 class AppBannerInfoBarDelegateDesktop : public ConfirmInfoBarDelegate { | 30 class AppBannerInfoBarDelegateDesktop : public ConfirmInfoBarDelegate { |
| 31 | 31 |
| 32 public: | 32 public: |
| 33 static infobars::InfoBar* Create( | 33 static infobars::InfoBar* Create( |
| 34 content::WebContents* web_contents, | 34 content::WebContents* web_contents, |
| 35 base::WeakPtr<AppBannerManager> weak_manager, | 35 base::WeakPtr<AppBannerManager> weak_manager, |
| 36 extensions::BookmarkAppHelper* bookmark_app_helper, | 36 extensions::BookmarkAppHelper* bookmark_app_helper, |
| 37 const content::Manifest& manifest, | 37 const content::Manifest& manifest); |
| 38 int event_request_id); | |
| 39 | 38 |
| 40 private: | 39 private: |
| 41 AppBannerInfoBarDelegateDesktop( | 40 AppBannerInfoBarDelegateDesktop( |
| 42 base::WeakPtr<AppBannerManager> weak_manager, | 41 base::WeakPtr<AppBannerManager> weak_manager, |
| 43 extensions::BookmarkAppHelper* bookmark_app_helper, | 42 extensions::BookmarkAppHelper* bookmark_app_helper, |
| 44 const content::Manifest& manifest, | 43 const content::Manifest& manifest); |
| 45 int event_request_id); | |
| 46 ~AppBannerInfoBarDelegateDesktop() override; | 44 ~AppBannerInfoBarDelegateDesktop() override; |
| 47 | 45 |
| 48 // ConfirmInfoBarDelegate: | 46 // ConfirmInfoBarDelegate: |
| 49 Type GetInfoBarType() const override; | 47 Type GetInfoBarType() const override; |
| 50 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | 48 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
| 51 const gfx::VectorIcon& GetVectorIcon() const override; | 49 const gfx::VectorIcon& GetVectorIcon() const override; |
| 52 void InfoBarDismissed() override; | 50 void InfoBarDismissed() override; |
| 53 base::string16 GetMessageText() const override; | 51 base::string16 GetMessageText() const override; |
| 54 int GetButtons() const override; | 52 int GetButtons() const override; |
| 55 base::string16 GetButtonLabel(InfoBarButton button) const override; | 53 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 56 bool Accept() override; | 54 bool Accept() override; |
| 57 | 55 |
| 58 base::WeakPtr<AppBannerManager> weak_manager_; | 56 base::WeakPtr<AppBannerManager> weak_manager_; |
| 59 extensions::BookmarkAppHelper* bookmark_app_helper_; | 57 extensions::BookmarkAppHelper* bookmark_app_helper_; |
| 60 content::Manifest manifest_; | 58 content::Manifest manifest_; |
| 61 int event_request_id_; | |
| 62 bool has_user_interaction_; | 59 bool has_user_interaction_; |
| 63 | 60 |
| 64 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateDesktop); | 61 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateDesktop); |
| 65 }; | 62 }; |
| 66 | 63 |
| 67 } // namespace banners | 64 } // namespace banners |
| 68 | 65 |
| 69 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ | 66 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_INFOBAR_DELEGATE_DESKTOP_H_ |
| OLD | NEW |