| 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/android/resource_mapper.h" | 10 #include "chrome/browser/android/resource_mapper.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 jobject java_content_view, | 78 jobject java_content_view, |
| 79 WebContents* web_contents) { | 79 WebContents* web_contents) { |
| 80 // Important to use GetVisibleEntry to match what's showing in the omnibox. | 80 // Important to use GetVisibleEntry to match what's showing in the omnibox. |
| 81 content::NavigationEntry* nav_entry = | 81 content::NavigationEntry* nav_entry = |
| 82 web_contents->GetController().GetVisibleEntry(); | 82 web_contents->GetController().GetVisibleEntry(); |
| 83 if (nav_entry == NULL) | 83 if (nav_entry == NULL) |
| 84 return; | 84 return; |
| 85 | 85 |
| 86 popup_jobject_.Reset( | 86 popup_jobject_.Reset( |
| 87 Java_WebsiteSettingsPopup_create(env, context, java_content_view, | 87 Java_WebsiteSettingsPopup_create(env, context, java_content_view, |
| 88 reinterpret_cast<jint>(this))); | 88 reinterpret_cast<intptr_t>(this))); |
| 89 | 89 |
| 90 presenter_.reset(new WebsiteSettings( | 90 presenter_.reset(new WebsiteSettings( |
| 91 this, | 91 this, |
| 92 Profile::FromBrowserContext(web_contents->GetBrowserContext()), | 92 Profile::FromBrowserContext(web_contents->GetBrowserContext()), |
| 93 TabSpecificContentSettings::FromWebContents(web_contents), | 93 TabSpecificContentSettings::FromWebContents(web_contents), |
| 94 InfoBarService::FromWebContents(web_contents), | 94 InfoBarService::FromWebContents(web_contents), |
| 95 nav_entry->GetURL(), | 95 nav_entry->GetURL(), |
| 96 nav_entry->GetSSL(), | 96 nav_entry->GetSSL(), |
| 97 content::CertStore::GetInstance())); | 97 content::CertStore::GetInstance())); |
| 98 } | 98 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 void WebsiteSettingsPopupAndroid::SetFirstVisit( | 174 void WebsiteSettingsPopupAndroid::SetFirstVisit( |
| 175 const string16& first_visit) { | 175 const string16& first_visit) { |
| 176 NOTIMPLEMENTED(); | 176 NOTIMPLEMENTED(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 // static | 179 // static |
| 180 bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid( | 180 bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid( |
| 181 JNIEnv* env) { | 181 JNIEnv* env) { |
| 182 return RegisterNativesImpl(env); | 182 return RegisterNativesImpl(env); |
| 183 } | 183 } |
| OLD | NEW |