| 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 "components/web_contents_delegate_android/web_contents_delegate_android
.h" | 5 #include "components/web_contents_delegate_android/web_contents_delegate_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_array.h" | 10 #include "base/android/jni_array.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 env, | 96 env, |
| 97 reinterpret_cast<const uint8*>( | 97 reinterpret_cast<const uint8*>( |
| 98 params.browser_initiated_post_data.get()->front()), | 98 params.browser_initiated_post_data.get()->front()), |
| 99 params.browser_initiated_post_data.get()->size()); | 99 params.browser_initiated_post_data.get()->size()); |
| 100 } | 100 } |
| 101 Java_WebContentsDelegateAndroid_openNewTab(env, | 101 Java_WebContentsDelegateAndroid_openNewTab(env, |
| 102 obj.obj(), | 102 obj.obj(), |
| 103 java_url.obj(), | 103 java_url.obj(), |
| 104 extra_headers.obj(), | 104 extra_headers.obj(), |
| 105 post_data.obj(), | 105 post_data.obj(), |
| 106 disposition == OFF_THE_RECORD); | 106 disposition); |
| 107 return NULL; | 107 return NULL; |
| 108 } | 108 } |
| 109 | 109 |
| 110 source->GetController().LoadURL(url, params.referrer, transition, | 110 source->GetController().LoadURL(url, params.referrer, transition, |
| 111 std::string()); | 111 std::string()); |
| 112 return source; | 112 return source; |
| 113 } | 113 } |
| 114 | 114 |
| 115 void WebContentsDelegateAndroid::NavigationStateChanged( | 115 void WebContentsDelegateAndroid::NavigationStateChanged( |
| 116 const WebContents* source, unsigned changed_flags) { | 116 const WebContents* source, unsigned changed_flags) { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 353 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
| 354 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { | 354 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { |
| 355 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; | 355 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; |
| 356 return false; | 356 return false; |
| 357 } | 357 } |
| 358 return RegisterNativesImpl(env); | 358 return RegisterNativesImpl(env); |
| 359 } | 359 } |
| 360 | 360 |
| 361 } // namespace web_contents_delegate_android | 361 } // namespace web_contents_delegate_android |
| OLD | NEW |