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

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

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years 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_ANDROID_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_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 "chrome/browser/android/banners/app_banner_data_fetcher_android.h" 10 #include "chrome/browser/android/banners/app_banner_data_fetcher_android.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void OnInstallFinished(JNIEnv* env, 61 void OnInstallFinished(JNIEnv* env,
62 const base::android::JavaParamRef<jobject>& obj, 62 const base::android::JavaParamRef<jobject>& obj,
63 jboolean success); 63 jboolean success);
64 64
65 private: 65 private:
66 void CreateJavaDelegate(); 66 void CreateJavaDelegate();
67 void SendBannerAccepted(content::WebContents* web_contents, 67 void SendBannerAccepted(content::WebContents* web_contents,
68 const std::string& platform); 68 const std::string& platform);
69 69
70 // ConfirmInfoBarDelegate: 70 // ConfirmInfoBarDelegate:
71 std::string GetIdentifier() const override;
71 gfx::Image GetIcon() const override; 72 gfx::Image GetIcon() const override;
72 void InfoBarDismissed() override; 73 void InfoBarDismissed() override;
73 base::string16 GetMessageText() const override; 74 base::string16 GetMessageText() const override;
74 int GetButtons() const override; 75 int GetButtons() const override;
75 bool Accept() override; 76 bool Accept() override;
76 bool LinkClicked(WindowOpenDisposition disposition) override; 77 bool LinkClicked(WindowOpenDisposition disposition) override;
77 78
78 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; 79 base::android::ScopedJavaGlobalRef<jobject> java_delegate_;
79 80
80 // Used to fetch the splash screen icon for webapps. 81 // Used to fetch the splash screen icon for webapps.
(...skipping 12 matching lines...) Expand all
93 94
94 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); 95 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid);
95 }; // AppBannerInfoBarDelegateAndroid 96 }; // AppBannerInfoBarDelegateAndroid
96 97
97 // Register native methods. 98 // Register native methods.
98 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); 99 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env);
99 100
100 } // namespace banners 101 } // namespace banners
101 102
102 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 103 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698