| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/website_settings_popup_android.h" | 5 #include "chrome/browser/ui/android/website_settings_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/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Important to use GetVisibleEntry to match what's showing in the omnibox. | 44 // Important to use GetVisibleEntry to match what's showing in the omnibox. |
| 45 content::NavigationEntry* nav_entry = | 45 content::NavigationEntry* nav_entry = |
| 46 web_contents->GetController().GetVisibleEntry(); | 46 web_contents->GetController().GetVisibleEntry(); |
| 47 if (nav_entry == NULL) | 47 if (nav_entry == NULL) |
| 48 return; | 48 return; |
| 49 | 49 |
| 50 url_ = nav_entry->GetURL(); | 50 url_ = nav_entry->GetURL(); |
| 51 | 51 |
| 52 popup_jobject_.Reset(env, java_website_settings_pop); | 52 popup_jobject_.Reset(env, java_website_settings_pop); |
| 53 | 53 |
| 54 SecurityStateModel* security_model = |
| 55 SecurityStateModel::FromWebContents(web_contents); |
| 56 DCHECK(security_model); |
| 57 |
| 54 presenter_.reset(new WebsiteSettings( | 58 presenter_.reset(new WebsiteSettings( |
| 55 this, | 59 this, Profile::FromBrowserContext(web_contents->GetBrowserContext()), |
| 56 Profile::FromBrowserContext(web_contents->GetBrowserContext()), | 60 TabSpecificContentSettings::FromWebContents(web_contents), web_contents, |
| 57 TabSpecificContentSettings::FromWebContents(web_contents), | 61 nav_entry->GetURL(), security_model->GetSecurityInfo(), |
| 58 web_contents, | |
| 59 nav_entry->GetURL(), | |
| 60 nav_entry->GetSSL(), | |
| 61 content::CertStore::GetInstance())); | 62 content::CertStore::GetInstance())); |
| 62 } | 63 } |
| 63 | 64 |
| 64 WebsiteSettingsPopupAndroid::~WebsiteSettingsPopupAndroid() {} | 65 WebsiteSettingsPopupAndroid::~WebsiteSettingsPopupAndroid() {} |
| 65 | 66 |
| 66 void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, jobject obj) { | 67 void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, jobject obj) { |
| 67 delete this; | 68 delete this; |
| 68 } | 69 } |
| 69 | 70 |
| 70 void WebsiteSettingsPopupAndroid::OnPermissionSettingChanged(JNIEnv* env, | 71 void WebsiteSettingsPopupAndroid::OnPermissionSettingChanged(JNIEnv* env, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 WebsiteSettingsUI::TabId tab_id) { | 137 WebsiteSettingsUI::TabId tab_id) { |
| 137 // There's no tab UI on Android - only connection info is shown. | 138 // There's no tab UI on Android - only connection info is shown. |
| 138 NOTIMPLEMENTED(); | 139 NOTIMPLEMENTED(); |
| 139 } | 140 } |
| 140 | 141 |
| 141 // static | 142 // static |
| 142 bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid( | 143 bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid( |
| 143 JNIEnv* env) { | 144 JNIEnv* env) { |
| 144 return RegisterNativesImpl(env); | 145 return RegisterNativesImpl(env); |
| 145 } | 146 } |
| OLD | NEW |