| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/component/web_contents_delegate_android/web_contents_de
legate_android.h" | 5 #include "chrome/browser/component/web_contents_delegate_android/web_contents_de
legate_android.h" |
| 6 | 6 |
| 7 #include <android/keycodes.h> | 7 #include <android/keycodes.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| 11 #include "content/public/browser/render_widget_host_view.h" | 11 #include "content/public/browser/render_widget_host_view.h" |
| 12 #include "content/public/browser/download_item.h" | 12 #include "content/public/browser/download_item.h" |
| 13 #include "content/public/browser/invalidate_type.h" | 13 #include "content/public/browser/invalidate_type.h" |
| 14 #include "content/public/browser/page_navigator.h" | 14 #include "content/public/browser/page_navigator.h" |
| 15 #include "content/public/browser/navigation_controller.h" | 15 #include "content/public/browser/navigation_controller.h" |
| 16 #include "content/public/browser/navigation_entry.h" | 16 #include "content/public/browser/navigation_entry.h" |
| 17 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 18 #include "content/public/common/page_transition_types.h" | 18 #include "content/public/common/page_transition_types.h" |
| 19 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
| 20 #include "jni/WebContentsDelegateAndroid_jni.h" | 20 #include "jni/WebContentsDelegateAndroid_jni.h" |
| 21 #include "net/http/http_request_headers.h" | 21 #include "net/http/http_request_headers.h" |
| 22 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
| 23 #include "webkit/glue/window_open_disposition.h" | 23 #include "webkit/glue/window_open_disposition.h" |
| 24 | 24 |
| 25 using base::android::AttachCurrentThread; | 25 using base::android::AttachCurrentThread; |
| 26 using base::android::CheckException; | 26 using base::android::CheckException; |
| 27 using base::android::ConvertUTF8ToJavaString; | 27 using base::android::ConvertUTF8ToJavaString; |
| 28 using base::android::ConvertUTF16ToJavaString; | 28 using base::android::ConvertUTF16ToJavaString; |
| 29 using base::android::GetClass; | 29 using base::android::GetClass; |
| 30 using base::android::GetMethodID; | |
| 31 using base::android::HasClass; | 30 using base::android::HasClass; |
| 32 using base::android::ScopedJavaLocalRef; | 31 using base::android::ScopedJavaLocalRef; |
| 33 using content::DownloadItem; | 32 using content::DownloadItem; |
| 34 using content::JavaScriptDialogCreator; | 33 using content::JavaScriptDialogCreator; |
| 35 using content::RenderViewHost; | 34 using content::RenderViewHost; |
| 36 using content::WebContents; | 35 using content::WebContents; |
| 37 | 36 |
| 38 namespace web_contents_delegate_android { | 37 namespace web_contents_delegate_android { |
| 39 | 38 |
| 40 WebContentsDelegateAndroid::WebContentsDelegateAndroid(JNIEnv* env, jobject obj) | 39 WebContentsDelegateAndroid::WebContentsDelegateAndroid(JNIEnv* env, jobject obj) |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 341 |
| 343 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 342 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
| 344 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { | 343 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { |
| 345 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; | 344 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; |
| 346 return false; | 345 return false; |
| 347 } | 346 } |
| 348 return RegisterNativesImpl(env); | 347 return RegisterNativesImpl(env); |
| 349 } | 348 } |
| 350 | 349 |
| 351 } // namespace web_contents_delegate_android | 350 } // namespace web_contents_delegate_android |
| OLD | NEW |