| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   57  |   57  | 
|   58   presenter_.reset(new WebsiteSettings( |   58   presenter_.reset(new WebsiteSettings( | 
|   59       this, Profile::FromBrowserContext(web_contents->GetBrowserContext()), |   59       this, Profile::FromBrowserContext(web_contents->GetBrowserContext()), | 
|   60       TabSpecificContentSettings::FromWebContents(web_contents), web_contents, |   60       TabSpecificContentSettings::FromWebContents(web_contents), web_contents, | 
|   61       nav_entry->GetURL(), security_model->GetSecurityInfo(), |   61       nav_entry->GetURL(), security_model->GetSecurityInfo(), | 
|   62       content::CertStore::GetInstance())); |   62       content::CertStore::GetInstance())); | 
|   63 } |   63 } | 
|   64  |   64  | 
|   65 WebsiteSettingsPopupAndroid::~WebsiteSettingsPopupAndroid() {} |   65 WebsiteSettingsPopupAndroid::~WebsiteSettingsPopupAndroid() {} | 
|   66  |   66  | 
|   67 void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, jobject obj) { |   67 void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, | 
 |   68                                           const JavaParamRef<jobject>& obj) { | 
|   68   delete this; |   69   delete this; | 
|   69 } |   70 } | 
|   70  |   71  | 
|   71 void WebsiteSettingsPopupAndroid::OnPermissionSettingChanged(JNIEnv* env, |   72 void WebsiteSettingsPopupAndroid::OnPermissionSettingChanged( | 
|   72                                                              jobject obj, |   73     JNIEnv* env, | 
|   73                                                              jint type, |   74     const JavaParamRef<jobject>& obj, | 
|   74                                                              jint setting) { |   75     jint type, | 
 |   76     jint setting) { | 
|   75   ContentSettingsType content_setting_type = |   77   ContentSettingsType content_setting_type = | 
|   76       static_cast<ContentSettingsType>(type); |   78       static_cast<ContentSettingsType>(type); | 
|   77   ContentSetting content_setting = static_cast<ContentSetting>(setting); |   79   ContentSetting content_setting = static_cast<ContentSetting>(setting); | 
|   78   presenter_->OnSitePermissionChanged(content_setting_type, content_setting); |   80   presenter_->OnSitePermissionChanged(content_setting_type, content_setting); | 
|   79 } |   81 } | 
|   80  |   82  | 
|   81 void WebsiteSettingsPopupAndroid::SetIdentityInfo( |   83 void WebsiteSettingsPopupAndroid::SetIdentityInfo( | 
|   82     const IdentityInfo& identity_info) { |   84     const IdentityInfo& identity_info) { | 
|   83   JNIEnv* env = base::android::AttachCurrentThread(); |   85   JNIEnv* env = base::android::AttachCurrentThread(); | 
|   84   Java_WebsiteSettingsPopup_showDialog(env, popup_jobject_.obj()); |   86   Java_WebsiteSettingsPopup_showDialog(env, popup_jobject_.obj()); | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  137     WebsiteSettingsUI::TabId tab_id) { |  139     WebsiteSettingsUI::TabId tab_id) { | 
|  138   // There's no tab UI on Android - only connection info is shown. |  140   // There's no tab UI on Android - only connection info is shown. | 
|  139   NOTIMPLEMENTED(); |  141   NOTIMPLEMENTED(); | 
|  140 } |  142 } | 
|  141  |  143  | 
|  142 // static |  144 // static | 
|  143 bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid( |  145 bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid( | 
|  144     JNIEnv* env) { |  146     JNIEnv* env) { | 
|  145   return RegisterNativesImpl(env); |  147   return RegisterNativesImpl(env); | 
|  146 } |  148 } | 
| OLD | NEW |