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

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: Nit again Created 4 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_infobar_delegate_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void OnInstallFinished(JNIEnv* env, 62 void OnInstallFinished(JNIEnv* env,
63 const base::android::JavaParamRef<jobject>& obj, 63 const base::android::JavaParamRef<jobject>& obj,
64 jboolean success); 64 jboolean success);
65 65
66 private: 66 private:
67 void CreateJavaDelegate(); 67 void CreateJavaDelegate();
68 void SendBannerAccepted(content::WebContents* web_contents, 68 void SendBannerAccepted(content::WebContents* web_contents,
69 const std::string& platform); 69 const std::string& platform);
70 70
71 // ConfirmInfoBarDelegate: 71 // ConfirmInfoBarDelegate:
72 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
72 gfx::Image GetIcon() const override; 73 gfx::Image GetIcon() const override;
73 void InfoBarDismissed() override; 74 void InfoBarDismissed() override;
74 base::string16 GetMessageText() const override; 75 base::string16 GetMessageText() const override;
75 int GetButtons() const override; 76 int GetButtons() const override;
76 bool Accept() override; 77 bool Accept() override;
77 bool LinkClicked(WindowOpenDisposition disposition) override; 78 bool LinkClicked(WindowOpenDisposition disposition) override;
78 79
79 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; 80 base::android::ScopedJavaGlobalRef<jobject> java_delegate_;
80 81
81 // Used to fetch the splash screen icon for webapps. 82 // Used to fetch the splash screen icon for webapps.
(...skipping 12 matching lines...) Expand all
94 95
95 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); 96 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid);
96 }; // AppBannerInfoBarDelegateAndroid 97 }; // AppBannerInfoBarDelegateAndroid
97 98
98 // Register native methods. 99 // Register native methods.
99 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); 100 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env);
100 101
101 } // namespace banners 102 } // namespace banners
102 103
103 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 104 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_infobar_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698