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

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

Issue 2641973003: Implement server-suggested update check backoff (Closed)
Patch Set: Created 3 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
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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "chrome/browser/android/webapk/webapk_install_service.h"
15 #include "chrome/browser/android/webapk/webapk_metrics.h" 16 #include "chrome/browser/android/webapk/webapk_metrics.h"
16 #include "components/infobars/core/confirm_infobar_delegate.h" 17 #include "components/infobars/core/confirm_infobar_delegate.h"
17 #include "ui/gfx/image/image.h" 18 #include "ui/gfx/image/image.h"
18 19
19 namespace content { 20 namespace content {
20 class WebContents; 21 class WebContents;
21 } 22 }
22 23
23 namespace infobars { 24 namespace infobars {
24 class InfoBarManager; 25 class InfoBarManager;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 // Called when the OK button on a WebAPK infobar is pressed. If the WebAPK is 116 // Called when the OK button on a WebAPK infobar is pressed. If the WebAPK is
116 // already installed, opens it; otherwise, installs it. Returns whether the 117 // already installed, opens it; otherwise, installs it. Returns whether the
117 // infobar should be closed as a result of the button press. 118 // infobar should be closed as a result of the button press.
118 bool AcceptWebApk(content::WebContents* web_contents); 119 bool AcceptWebApk(content::WebContents* web_contents);
119 120
120 // Returns false if this delegate is for a WebAPK and was triggered from the 121 // Returns false if this delegate is for a WebAPK and was triggered from the
121 // A2HS menu item. Otherwise returns true. 122 // A2HS menu item. Otherwise returns true.
122 bool TriggeredFromBanner() const; 123 bool TriggeredFromBanner() const;
123 void SendBannerAccepted(); 124 void SendBannerAccepted();
124 void OnWebApkInstallFinished(bool success, 125 void OnWebApkInstallFinished(
125 const std::string& webapk_package_name); 126 bool success,
127 const WebApkInstallService::FinishCallbackData& data);
126 void TrackWebApkInstallationDismissEvents(InstallState install_state); 128 void TrackWebApkInstallationDismissEvents(InstallState install_state);
127 129
128 // ConfirmInfoBarDelegate: 130 // ConfirmInfoBarDelegate:
129 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; 131 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
130 gfx::Image GetIcon() const override; 132 gfx::Image GetIcon() const override;
131 void InfoBarDismissed() override; 133 void InfoBarDismissed() override;
132 base::string16 GetMessageText() const override; 134 base::string16 GetMessageText() const override;
133 int GetButtons() const override; 135 int GetButtons() const override;
134 bool LinkClicked(WindowOpenDisposition disposition) override; 136 bool LinkClicked(WindowOpenDisposition disposition) override;
135 137
(...skipping 28 matching lines...) Expand all
164 166
165 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); 167 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid);
166 }; 168 };
167 169
168 // Register native methods. 170 // Register native methods.
169 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); 171 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env);
170 172
171 } // namespace banners 173 } // namespace banners
172 174
173 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 175 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698