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

Side by Side Diff: chrome/browser/ui/android/infobars/data_reduction_promo_infobar.cc

Issue 2022313002: UI for the Data Saver InfoBar Promo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobarPromo
Patch Set: "tbansal comments" Created 4 years, 5 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/android/infobars/data_reduction_promo_infobar.h"
6
7 #include <utility>
8
9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h"
11 #include "base/logging.h"
12 #include "base/memory/ptr_util.h"
13 #include "chrome/browser/android/resource_mapper.h"
14 #include "chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_and roid.h"
15 #include "content/public/browser/web_contents.h"
16
17 // DataReductionPromoInfoBar --------------------------------------------------
18
19 DataReductionPromoInfoBar::DataReductionPromoInfoBar(
20 std::unique_ptr<DataReductionPromoInfoBarDelegateAndroid> delegate)
21 : ConfirmInfoBar(std::move(delegate)) {}
22
23 DataReductionPromoInfoBar::~DataReductionPromoInfoBar() {
24 }
25
26 base::android::ScopedJavaLocalRef<jobject>
27 DataReductionPromoInfoBar::CreateRenderInfoBar(JNIEnv* env) {
28 return GetDelegate()->CreateRenderInfoBar(env);
29 }
30
31 DataReductionPromoInfoBarDelegateAndroid*
32 DataReductionPromoInfoBar::GetDelegate() {
33 return static_cast<DataReductionPromoInfoBarDelegateAndroid*>(delegate());
34 }
35
36 // DataReductionPromoInfoBarDelegate ------------------------------------------
37
38 // static
39 std::unique_ptr<infobars::InfoBar>
40 DataReductionPromoInfoBarDelegateAndroid::CreateInfoBar(
41 infobars::InfoBarManager* infobar_manager,
42 std::unique_ptr<DataReductionPromoInfoBarDelegateAndroid> delegate) {
43 return base::MakeUnique<DataReductionPromoInfoBar>(std::move(delegate));
44 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/data_reduction_promo_infobar.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698