Index: chrome/browser/ui/android/page_info/page_info_popup_android.cc |
diff --git a/chrome/browser/ui/android/page_info/website_settings_popup_android.cc b/chrome/browser/ui/android/page_info/page_info_popup_android.cc |
similarity index 76% |
rename from chrome/browser/ui/android/page_info/website_settings_popup_android.cc |
rename to chrome/browser/ui/android/page_info/page_info_popup_android.cc |
index 0f4bd98acdcd0843a71291202fb2c1455a9cc70b..0328fd59aa50d8dae4efad0c26756ce90e2c3d50 100644 |
--- a/chrome/browser/ui/android/page_info/website_settings_popup_android.cc |
+++ b/chrome/browser/ui/android/page_info/page_info_popup_android.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/ui/android/page_info/website_settings_popup_android.h" |
+#include "chrome/browser/ui/android/page_info/page_info_popup_android.h" |
#include "base/android/jni_android.h" |
#include "base/android/jni_array.h" |
@@ -12,8 +12,8 @@ |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ssl/security_state_tab_helper.h" |
-#include "chrome/browser/ui/page_info/website_settings.h" |
-#include "chrome/browser/ui/page_info/website_settings_ui.h" |
+#include "chrome/browser/ui/page_info/page_info.h" |
+#include "chrome/browser/ui/page_info/page_info_ui.h" |
#include "components/content_settings/core/common/content_settings.h" |
#include "components/content_settings/core/common/content_settings_types.h" |
#include "components/security_state/core/security_state.h" |
@@ -21,7 +21,7 @@ |
#include "content/public/browser/navigation_controller.h" |
#include "content/public/browser/navigation_entry.h" |
#include "content/public/browser/web_contents.h" |
-#include "jni/WebsiteSettingsPopup_jni.h" |
+#include "jni/PageInfoPopup_jni.h" |
#include "url/origin.h" |
using base::android::ConvertUTF16ToJavaString; |
@@ -37,13 +37,12 @@ static jlong Init(JNIEnv* env, |
content::WebContents::FromJavaWebContents(java_web_contents); |
return reinterpret_cast<intptr_t>( |
- new WebsiteSettingsPopupAndroid(env, obj, web_contents)); |
+ new PageInfoPopupAndroid(env, obj, web_contents)); |
} |
-WebsiteSettingsPopupAndroid::WebsiteSettingsPopupAndroid( |
- JNIEnv* env, |
- jobject java_website_settings_pop, |
- content::WebContents* web_contents) |
+PageInfoPopupAndroid::PageInfoPopupAndroid(JNIEnv* env, |
+ jobject java_page_info_pop, |
+ content::WebContents* web_contents) |
: search_geolocation_service_(nullptr) { |
// Important to use GetVisibleEntry to match what's showing in the omnibox. |
content::NavigationEntry* nav_entry = |
@@ -53,7 +52,7 @@ WebsiteSettingsPopupAndroid::WebsiteSettingsPopupAndroid( |
url_ = nav_entry->GetURL(); |
- popup_jobject_.Reset(env, java_website_settings_pop); |
+ popup_jobject_.Reset(env, java_page_info_pop); |
SecurityStateTabHelper* helper = |
SecurityStateTabHelper::FromWebContents(web_contents); |
@@ -65,45 +64,44 @@ WebsiteSettingsPopupAndroid::WebsiteSettingsPopupAndroid( |
SearchGeolocationService::Factory::GetForBrowserContext( |
web_contents->GetBrowserContext()); |
- presenter_.reset(new WebsiteSettings( |
+ presenter_.reset(new PageInfo( |
this, Profile::FromBrowserContext(web_contents->GetBrowserContext()), |
TabSpecificContentSettings::FromWebContents(web_contents), web_contents, |
nav_entry->GetURL(), security_info)); |
} |
-WebsiteSettingsPopupAndroid::~WebsiteSettingsPopupAndroid() {} |
+PageInfoPopupAndroid::~PageInfoPopupAndroid() {} |
-void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, |
- const JavaParamRef<jobject>& obj) { |
+void PageInfoPopupAndroid::Destroy(JNIEnv* env, |
+ const JavaParamRef<jobject>& obj) { |
delete this; |
} |
-void WebsiteSettingsPopupAndroid::RecordWebsiteSettingsAction( |
+void PageInfoPopupAndroid::RecordPageInfoAction( |
JNIEnv* env, |
const JavaParamRef<jobject>& obj, |
jint action) { |
- presenter_->RecordWebsiteSettingsAction( |
- static_cast<WebsiteSettings::WebsiteSettingsAction>(action)); |
+ presenter_->RecordPageInfoAction( |
+ static_cast<PageInfo::PageInfoAction>(action)); |
} |
-void WebsiteSettingsPopupAndroid::SetIdentityInfo( |
- const IdentityInfo& identity_info) { |
+void PageInfoPopupAndroid::SetIdentityInfo(const IdentityInfo& identity_info) { |
JNIEnv* env = base::android::AttachCurrentThread(); |
- std::unique_ptr<WebsiteSettingsUI::SecurityDescription> security_description = |
+ std::unique_ptr<PageInfoUI::SecurityDescription> security_description = |
identity_info.GetSecurityDescription(); |
- Java_WebsiteSettingsPopup_setSecurityDescription( |
+ Java_PageInfoPopup_setSecurityDescription( |
env, popup_jobject_, |
ConvertUTF16ToJavaString(env, security_description->summary), |
ConvertUTF16ToJavaString(env, security_description->details)); |
} |
-void WebsiteSettingsPopupAndroid::SetCookieInfo( |
+void PageInfoPopupAndroid::SetCookieInfo( |
const CookieInfoList& cookie_info_list) { |
NOTIMPLEMENTED(); |
} |
-void WebsiteSettingsPopupAndroid::SetPermissionInfo( |
+void PageInfoPopupAndroid::SetPermissionInfo( |
const PermissionInfoList& permission_info_list, |
ChosenObjectInfoList chosen_object_info_list) { |
JNIEnv* env = base::android::AttachCurrentThread(); |
@@ -144,9 +142,9 @@ void WebsiteSettingsPopupAndroid::SetPermissionInfo( |
for (const auto& permission : permissions_to_display) { |
if (base::ContainsKey(user_specified_settings_to_display, permission)) { |
base::string16 setting_title = |
- WebsiteSettingsUI::PermissionTypeToUIString(permission); |
+ PageInfoUI::PermissionTypeToUIString(permission); |
- Java_WebsiteSettingsPopup_addPermissionSection( |
+ Java_PageInfoPopup_addPermissionSection( |
env, popup_jobject_, ConvertUTF16ToJavaString(env, setting_title), |
static_cast<jint>(permission), |
static_cast<jint>(user_specified_settings_to_display[permission])); |
@@ -155,19 +153,18 @@ void WebsiteSettingsPopupAndroid::SetPermissionInfo( |
for (const auto& chosen_object : chosen_object_info_list) { |
base::string16 object_title = |
- WebsiteSettingsUI::ChosenObjectToUIString(*chosen_object); |
+ PageInfoUI::ChosenObjectToUIString(*chosen_object); |
- Java_WebsiteSettingsPopup_addPermissionSection( |
+ Java_PageInfoPopup_addPermissionSection( |
env, popup_jobject_, ConvertUTF16ToJavaString(env, object_title), |
static_cast<jint>(chosen_object->ui_info.content_settings_type), |
static_cast<jint>(CONTENT_SETTING_ALLOW)); |
} |
- Java_WebsiteSettingsPopup_updatePermissionDisplay(env, popup_jobject_); |
+ Java_PageInfoPopup_updatePermissionDisplay(env, popup_jobject_); |
} |
// static |
-bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid( |
- JNIEnv* env) { |
+bool PageInfoPopupAndroid::RegisterPageInfoPopupAndroid(JNIEnv* env) { |
return RegisterNativesImpl(env); |
} |