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

Side by Side Diff: chrome/browser/android/banners/app_banner_infobar_delegate.h

Issue 896243004: Start piping Android app promos through AppBannerInfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits Created 5 years, 10 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 unified diff | Download patch
OLDNEW
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_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "components/infobars/core/confirm_infobar_delegate.h" 10 #include "components/infobars/core/confirm_infobar_delegate.h"
(...skipping 25 matching lines...) Expand all
36 // Called when the infobar has been destroyed. 36 // Called when the infobar has been destroyed.
37 virtual void OnInfoBarDestroyed() = 0; 37 virtual void OnInfoBarDestroyed() = 0;
38 38
39 // Returns the title of the app. 39 // Returns the title of the app.
40 virtual base::string16 GetTitle() const = 0; 40 virtual base::string16 GetTitle() const = 0;
41 41
42 // Returns the icon to display for the app. 42 // Returns the icon to display for the app.
43 virtual gfx::Image GetIcon() const = 0; 43 virtual gfx::Image GetIcon() const = 0;
44 }; 44 };
45 45
46 // Creates a banner for the current page that promotes a native app.
47 // May return nullptr if the the infobar couldn't be created.
48 static AppBannerInfoBar* CreateForNativeApp(
49 infobars::InfoBarManager* infobar_manager,
50 AppDelegate* delegate,
51 const base::android::ScopedJavaGlobalRef<jobject>& japp_data);
52
46 // Creates a banner for the current page that promotes a web app. 53 // Creates a banner for the current page that promotes a web app.
47 // May return nullptr if the the infobar couldn't be created. 54 // May return nullptr if the the infobar couldn't be created.
48 static AppBannerInfoBar* CreateForWebApp( 55 static AppBannerInfoBar* CreateForWebApp(
49 infobars::InfoBarManager* infobar_manager, 56 infobars::InfoBarManager* infobar_manager,
50 AppDelegate* delegate, 57 AppDelegate* delegate,
51 const GURL& url); 58 const GURL& url);
52 59
53 ~AppBannerInfoBarDelegate() override; 60 ~AppBannerInfoBarDelegate() override;
54 61
55 // InfoBarDelegate overrides. 62 // InfoBarDelegate overrides.
(...skipping 11 matching lines...) Expand all
67 AppDelegate* delegate_; 74 AppDelegate* delegate_;
68 75
69 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegate); 76 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegate);
70 }; // AppBannerInfoBarDelegate 77 }; // AppBannerInfoBarDelegate
71 78
72 } // namespace banners 79 } // namespace banners
73 80
74 bool RegisterAppBannerInfoBarDelegate(JNIEnv* env); 81 bool RegisterAppBannerInfoBarDelegate(JNIEnv* env);
75 82
76 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_ 83 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | chrome/browser/android/banners/app_banner_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698