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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 #include "chrome/browser/ui/android/infobars/app_banner_infobar_android.h" 5 #include "chrome/browser/ui/android/infobars/app_banner_infobar_android.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h" 12 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h"
13 #include "jni/AppBannerInfoBarAndroid_jni.h" 13 #include "jni/AppBannerInfoBarAndroid_jni.h"
14 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 14 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
15 #include "ui/gfx/android/java_bitmap.h" 15 #include "ui/gfx/android/java_bitmap.h"
16 #include "ui/gfx/image/image.h" 16 #include "ui/gfx/image/image.h"
17 17
18 AppBannerInfoBarAndroid::AppBannerInfoBarAndroid( 18 AppBannerInfoBarAndroid::AppBannerInfoBarAndroid(
19 scoped_ptr<banners::AppBannerInfoBarDelegateAndroid> delegate, 19 std::unique_ptr<banners::AppBannerInfoBarDelegateAndroid> delegate,
20 const base::android::ScopedJavaGlobalRef<jobject>& japp_data) 20 const base::android::ScopedJavaGlobalRef<jobject>& japp_data)
21 : ConfirmInfoBar(std::move(delegate)), japp_data_(japp_data) {} 21 : ConfirmInfoBar(std::move(delegate)), japp_data_(japp_data) {}
22 22
23 AppBannerInfoBarAndroid::AppBannerInfoBarAndroid( 23 AppBannerInfoBarAndroid::AppBannerInfoBarAndroid(
24 scoped_ptr<banners::AppBannerInfoBarDelegateAndroid> delegate, 24 std::unique_ptr<banners::AppBannerInfoBarDelegateAndroid> delegate,
25 const GURL& app_url) 25 const GURL& app_url)
26 : ConfirmInfoBar(std::move(delegate)), app_url_(app_url) {} 26 : ConfirmInfoBar(std::move(delegate)), app_url_(app_url) {}
27 27
28 AppBannerInfoBarAndroid::~AppBannerInfoBarAndroid() { 28 AppBannerInfoBarAndroid::~AppBannerInfoBarAndroid() {
29 } 29 }
30 30
31 base::android::ScopedJavaLocalRef<jobject> 31 base::android::ScopedJavaLocalRef<jobject>
32 AppBannerInfoBarAndroid::CreateRenderInfoBar(JNIEnv* env) { 32 AppBannerInfoBarAndroid::CreateRenderInfoBar(JNIEnv* env) {
33 ConfirmInfoBarDelegate* app_banner_infobar_delegate = GetDelegate(); 33 ConfirmInfoBarDelegate* app_banner_infobar_delegate = GetDelegate();
34 34
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 JNIEnv* env = base::android::AttachCurrentThread(); 74 JNIEnv* env = base::android::AttachCurrentThread();
75 Java_AppBannerInfoBarAndroid_onInstallStateChanged(env, java_infobar_.obj(), 75 Java_AppBannerInfoBarAndroid_onInstallStateChanged(env, java_infobar_.obj(),
76 new_state); 76 new_state);
77 } 77 }
78 78
79 // Native JNI methods --------------------------------------------------------- 79 // Native JNI methods ---------------------------------------------------------
80 80
81 bool RegisterAppBannerInfoBarAndroid(JNIEnv* env) { 81 bool RegisterAppBannerInfoBarAndroid(JNIEnv* env) {
82 return RegisterNativesImpl(env); 82 return RegisterNativesImpl(env);
83 } 83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698