| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/android/content_view_core_impl.h" | 5 #include "content/browser/android/content_view_core_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 env, obj, scroll_offset.x(), scroll_offset.y(), page_scale_factor, | 435 env, obj, scroll_offset.x(), scroll_offset.y(), page_scale_factor, |
| 436 page_scale_factor_limits.x(), page_scale_factor_limits.y(), | 436 page_scale_factor_limits.x(), page_scale_factor_limits.y(), |
| 437 content_size.width(), content_size.height(), viewport_size.width(), | 437 content_size.width(), content_size.height(), viewport_size.width(), |
| 438 viewport_size.height(), top_controls_height, top_controls_shown_ratio, | 438 viewport_size.height(), top_controls_height, top_controls_shown_ratio, |
| 439 bottom_controls_height, bottom_controls_shown_ratio, | 439 bottom_controls_height, bottom_controls_shown_ratio, |
| 440 is_mobile_optimized_hint, has_insertion_marker, | 440 is_mobile_optimized_hint, has_insertion_marker, |
| 441 is_insertion_marker_visible, insertion_marker_horizontal, | 441 is_insertion_marker_visible, insertion_marker_horizontal, |
| 442 insertion_marker_top, insertion_marker_bottom); | 442 insertion_marker_top, insertion_marker_bottom); |
| 443 } | 443 } |
| 444 | 444 |
| 445 void ContentViewCoreImpl::OnBackgroundColorChanged(SkColor color) { | |
| 446 JNIEnv* env = AttachCurrentThread(); | |
| 447 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | |
| 448 if (obj.is_null()) | |
| 449 return; | |
| 450 Java_ContentViewCore_onBackgroundColorChanged(env, obj, color); | |
| 451 } | |
| 452 | |
| 453 void ContentViewCoreImpl::ShowSelectPopupMenu( | 445 void ContentViewCoreImpl::ShowSelectPopupMenu( |
| 454 RenderFrameHost* frame, | 446 RenderFrameHost* frame, |
| 455 const gfx::Rect& bounds, | 447 const gfx::Rect& bounds, |
| 456 const std::vector<MenuItem>& items, | 448 const std::vector<MenuItem>& items, |
| 457 int selected_item, | 449 int selected_item, |
| 458 bool multiple, | 450 bool multiple, |
| 459 bool right_aligned) { | 451 bool right_aligned) { |
| 460 JNIEnv* env = AttachCurrentThread(); | 452 JNIEnv* env = AttachCurrentThread(); |
| 461 ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env); | 453 ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env); |
| 462 if (j_obj.is_null()) | 454 if (j_obj.is_null()) |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1598 return ScopedJavaLocalRef<jobject>(); | 1590 return ScopedJavaLocalRef<jobject>(); |
| 1599 | 1591 |
| 1600 return view->GetJavaObject(); | 1592 return view->GetJavaObject(); |
| 1601 } | 1593 } |
| 1602 | 1594 |
| 1603 bool RegisterContentViewCore(JNIEnv* env) { | 1595 bool RegisterContentViewCore(JNIEnv* env) { |
| 1604 return RegisterNativesImpl(env); | 1596 return RegisterNativesImpl(env); |
| 1605 } | 1597 } |
| 1606 | 1598 |
| 1607 } // namespace content | 1599 } // namespace content |
| OLD | NEW |