| 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 "chrome/browser/android/resource_mapper.h" | 10 #include "chrome/browser/android/resource_mapper.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 presenter_.reset(new WebsiteSettings( | 97 presenter_.reset(new WebsiteSettings( |
| 98 this, Profile::FromBrowserContext(web_contents->GetBrowserContext()), | 98 this, Profile::FromBrowserContext(web_contents->GetBrowserContext()), |
| 99 TabSpecificContentSettings::FromWebContents(web_contents), web_contents, | 99 TabSpecificContentSettings::FromWebContents(web_contents), web_contents, |
| 100 nav_entry->GetURL(), security_model->GetSecurityInfo(), | 100 nav_entry->GetURL(), security_model->GetSecurityInfo(), |
| 101 content::CertStore::GetInstance())); | 101 content::CertStore::GetInstance())); |
| 102 } | 102 } |
| 103 | 103 |
| 104 ConnectionInfoPopupAndroid::~ConnectionInfoPopupAndroid() { | 104 ConnectionInfoPopupAndroid::~ConnectionInfoPopupAndroid() { |
| 105 } | 105 } |
| 106 | 106 |
| 107 void ConnectionInfoPopupAndroid::Destroy(JNIEnv* env, jobject obj) { | 107 void ConnectionInfoPopupAndroid::Destroy(JNIEnv* env, |
| 108 const JavaParamRef<jobject>& obj) { |
| 108 delete this; | 109 delete this; |
| 109 } | 110 } |
| 110 | 111 |
| 111 void ConnectionInfoPopupAndroid::ResetCertDecisions( | 112 void ConnectionInfoPopupAndroid::ResetCertDecisions( |
| 112 JNIEnv* env, | 113 JNIEnv* env, |
| 113 jobject obj, | 114 const JavaParamRef<jobject>& obj, |
| 114 jobject java_web_contents) { | 115 const JavaParamRef<jobject>& java_web_contents) { |
| 115 presenter_->OnRevokeSSLErrorBypassButtonPressed(); | 116 presenter_->OnRevokeSSLErrorBypassButtonPressed(); |
| 116 } | 117 } |
| 117 | 118 |
| 118 void ConnectionInfoPopupAndroid::SetIdentityInfo( | 119 void ConnectionInfoPopupAndroid::SetIdentityInfo( |
| 119 const IdentityInfo& identity_info) { | 120 const IdentityInfo& identity_info) { |
| 120 JNIEnv* env = base::android::AttachCurrentThread(); | 121 JNIEnv* env = base::android::AttachCurrentThread(); |
| 121 | 122 |
| 122 { | 123 { |
| 123 int icon_id = ResourceMapper::MapFromChromiumId( | 124 int icon_id = ResourceMapper::MapFromChromiumId( |
| 124 WebsiteSettingsUI::GetIdentityIconID(identity_info.identity_status)); | 125 WebsiteSettingsUI::GetIdentityIconID(identity_info.identity_status)); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // There's no tab UI on Android - only connection info is shown. | 190 // There's no tab UI on Android - only connection info is shown. |
| 190 NOTIMPLEMENTED(); | 191 NOTIMPLEMENTED(); |
| 191 } | 192 } |
| 192 | 193 |
| 193 // static | 194 // static |
| 194 bool | 195 bool |
| 195 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( | 196 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( |
| 196 JNIEnv* env) { | 197 JNIEnv* env) { |
| 197 return RegisterNativesImpl(env); | 198 return RegisterNativesImpl(env); |
| 198 } | 199 } |
| OLD | NEW |