Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / android_webview / native / aw_autofill_manager_delegate.cc
index 2d4ef1c..93e04be 100644 (file)
@@ -21,7 +21,6 @@
 #include "components/autofill/core/common/autofill_pref_names.h"
 #include "components/user_prefs/user_prefs.h"
 #include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
 #include "jni/AwAutofillManagerDelegate_jni.h"
 
 using base::android::AttachCurrentThread;
@@ -95,8 +94,7 @@ void AwAutofillManagerDelegate::ShowAutofillPopup(
   delegate_ = delegate;
 
   // Convert element_bounds to be in screen space.
-  gfx::Rect client_area;
-  web_contents_->GetView()->GetContainerBounds(&client_area);
+  gfx::Rect client_area = web_contents_->GetContainerBounds();
   gfx::RectF element_bounds_in_screen_space =
       element_bounds + client_area.OffsetFromOrigin();
 
@@ -195,12 +193,12 @@ void AwAutofillManagerDelegate::ConfirmSaveCreditCard(
 void AwAutofillManagerDelegate::ShowRequestAutocompleteDialog(
     const autofill::FormData& form,
     const GURL& source_url,
-    const base::Callback<void(const autofill::FormStructure*)>& callback) {
+    const ResultCallback& callback) {
   NOTIMPLEMENTED();
 }
 
 bool RegisterAwAutofillManagerDelegate(JNIEnv* env) {
-  return RegisterNativesImpl(env) >= 0;
+  return RegisterNativesImpl(env);
 }
 
 } // namespace android_webview