OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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/search_geolocation_disclosure_infob
ar.h" | 5 #include "chrome/browser/ui/android/infobars/search_geolocation_disclosure_infob
ar.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "chrome/browser/android/search_geolocation_disclosure_infobar_delegate.
h" | 8 #include "chrome/browser/android/search_geolocation/search_geolocation_disclosur
e_infobar_delegate.h" |
9 #include "jni/SearchGeolocationDisclosureInfoBar_jni.h" | 9 #include "jni/SearchGeolocationDisclosureInfoBar_jni.h" |
10 | 10 |
11 using base::android::JavaParamRef; | 11 using base::android::JavaParamRef; |
12 using base::android::ScopedJavaLocalRef; | 12 using base::android::ScopedJavaLocalRef; |
13 | 13 |
14 SearchGeolocationDisclosureInfoBar::SearchGeolocationDisclosureInfoBar( | 14 SearchGeolocationDisclosureInfoBar::SearchGeolocationDisclosureInfoBar( |
15 std::unique_ptr<SearchGeolocationDisclosureInfoBarDelegate> delegate) | 15 std::unique_ptr<SearchGeolocationDisclosureInfoBarDelegate> delegate) |
16 : InfoBarAndroid(std::move(delegate)) {} | 16 : InfoBarAndroid(std::move(delegate)) {} |
17 | 17 |
18 SearchGeolocationDisclosureInfoBar::~SearchGeolocationDisclosureInfoBar() { | 18 SearchGeolocationDisclosureInfoBar::~SearchGeolocationDisclosureInfoBar() { |
(...skipping 29 matching lines...) Expand all Loading... |
48 if (!owner()) | 48 if (!owner()) |
49 return; // We're closing; don't call anything, it might access the owner. | 49 return; // We're closing; don't call anything, it might access the owner. |
50 | 50 |
51 RemoveSelf(); | 51 RemoveSelf(); |
52 } | 52 } |
53 | 53 |
54 SearchGeolocationDisclosureInfoBarDelegate* | 54 SearchGeolocationDisclosureInfoBarDelegate* |
55 SearchGeolocationDisclosureInfoBar::GetDelegate() { | 55 SearchGeolocationDisclosureInfoBar::GetDelegate() { |
56 return static_cast<SearchGeolocationDisclosureInfoBarDelegate*>(delegate()); | 56 return static_cast<SearchGeolocationDisclosureInfoBarDelegate*>(delegate()); |
57 } | 57 } |
OLD | NEW |