OLD | NEW |
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/connection_info_popup_android.h" | 5 #include "chrome/browser/ui/android/connection_info_popup_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 web_contents->GetController().GetVisibleEntry(); | 86 web_contents->GetController().GetVisibleEntry(); |
87 if (nav_entry == nullptr) | 87 if (nav_entry == nullptr) |
88 return; | 88 return; |
89 | 89 |
90 popup_jobject_.Reset(env, java_website_settings_pop); | 90 popup_jobject_.Reset(env, java_website_settings_pop); |
91 | 91 |
92 ChromeSecurityStateModelClient* security_model_client = | 92 ChromeSecurityStateModelClient* security_model_client = |
93 ChromeSecurityStateModelClient::FromWebContents(web_contents); | 93 ChromeSecurityStateModelClient::FromWebContents(web_contents); |
94 DCHECK(security_model_client); | 94 DCHECK(security_model_client); |
95 | 95 |
| 96 security_state::SecurityStateModel::SecurityInfo security_info; |
| 97 security_model_client->GetSecurityInfo(&security_info); |
| 98 |
96 presenter_.reset(new WebsiteSettings( | 99 presenter_.reset(new WebsiteSettings( |
97 this, Profile::FromBrowserContext(web_contents->GetBrowserContext()), | 100 this, Profile::FromBrowserContext(web_contents->GetBrowserContext()), |
98 TabSpecificContentSettings::FromWebContents(web_contents), web_contents, | 101 TabSpecificContentSettings::FromWebContents(web_contents), web_contents, |
99 nav_entry->GetURL(), security_model_client->GetSecurityInfo())); | 102 nav_entry->GetURL(), security_info)); |
100 } | 103 } |
101 | 104 |
102 ConnectionInfoPopupAndroid::~ConnectionInfoPopupAndroid() { | 105 ConnectionInfoPopupAndroid::~ConnectionInfoPopupAndroid() { |
103 } | 106 } |
104 | 107 |
105 void ConnectionInfoPopupAndroid::Destroy(JNIEnv* env, | 108 void ConnectionInfoPopupAndroid::Destroy(JNIEnv* env, |
106 const JavaParamRef<jobject>& obj) { | 109 const JavaParamRef<jobject>& obj) { |
107 delete this; | 110 delete this; |
108 } | 111 } |
109 | 112 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // There's no tab UI on Android - only connection info is shown. | 197 // There's no tab UI on Android - only connection info is shown. |
195 NOTIMPLEMENTED(); | 198 NOTIMPLEMENTED(); |
196 } | 199 } |
197 | 200 |
198 // static | 201 // static |
199 bool | 202 bool |
200 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( | 203 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( |
201 JNIEnv* env) { | 204 JNIEnv* env) { |
202 return RegisterNativesImpl(env); | 205 return RegisterNativesImpl(env); |
203 } | 206 } |
OLD | NEW |