| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/web_contents/web_contents_android.h" | 5 #include "content/browser/web_contents/web_contents_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 // base::Callback. | 358 // base::Callback. |
| 359 ScopedJavaGlobalRef<jobject> j_callback; | 359 ScopedJavaGlobalRef<jobject> j_callback; |
| 360 j_callback.Reset(env, callback); | 360 j_callback.Reset(env, callback); |
| 361 content::RenderFrameHost::JavaScriptResultCallback js_callback = | 361 content::RenderFrameHost::JavaScriptResultCallback js_callback = |
| 362 base::Bind(&JavaScriptResultCallback, j_callback); | 362 base::Bind(&JavaScriptResultCallback, j_callback); |
| 363 | 363 |
| 364 web_contents_->GetMainFrame()->ExecuteJavaScript( | 364 web_contents_->GetMainFrame()->ExecuteJavaScript( |
| 365 ConvertJavaStringToUTF16(env, script), js_callback); | 365 ConvertJavaStringToUTF16(env, script), js_callback); |
| 366 } | 366 } |
| 367 | 367 |
| 368 void WebContentsAndroid::WasResized(JNIEnv* env, |
| 369 jobject obj) { |
| 370 web_contents_->GetRenderViewHost()->WasResized(); |
| 371 } |
| 372 |
| 368 } // namespace content | 373 } // namespace content |
| OLD | NEW |