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 "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 static_cast<int>(x / dpi_scale()), | 1571 static_cast<int>(x / dpi_scale()), |
1572 static_cast<int>(y / dpi_scale()), | 1572 static_cast<int>(y / dpi_scale()), |
1573 static_cast<int>((width > 0 && width < dpi_scale()) ? | 1573 static_cast<int>((width > 0 && width < dpi_scale()) ? |
1574 1 : (int)(width / dpi_scale())), | 1574 1 : (int)(width / dpi_scale())), |
1575 static_cast<int>((height > 0 && height < dpi_scale()) ? | 1575 static_cast<int>((height > 0 && height < dpi_scale()) ? |
1576 1 : (int)(height / dpi_scale()))); | 1576 1 : (int)(height / dpi_scale()))); |
1577 GetWebContents()->Send(new ViewMsg_ExtractSmartClipData( | 1577 GetWebContents()->Send(new ViewMsg_ExtractSmartClipData( |
1578 GetWebContents()->GetRoutingID(), rect)); | 1578 GetWebContents()->GetRoutingID(), rect)); |
1579 } | 1579 } |
1580 | 1580 |
| 1581 void ContentViewCoreImpl::ResumeResponseDeferredAtStart(JNIEnv* env, |
| 1582 jobject obj) { |
| 1583 GetWebContents()->ResumeResponseDeferredAtStart(); |
| 1584 } |
| 1585 |
1581 jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) { | 1586 jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) { |
1582 return GetRenderProcessIdFromRenderViewHost( | 1587 return GetRenderProcessIdFromRenderViewHost( |
1583 web_contents_->GetRenderViewHost()); | 1588 web_contents_->GetRenderViewHost()); |
1584 } | 1589 } |
1585 | 1590 |
1586 void ContentViewCoreImpl::OnSmartClipDataExtracted( | 1591 void ContentViewCoreImpl::OnSmartClipDataExtracted( |
1587 const base::string16& result) { | 1592 const base::string16& result) { |
1588 JNIEnv* env = AttachCurrentThread(); | 1593 JNIEnv* env = AttachCurrentThread(); |
1589 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 1594 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
1590 if (obj.is_null()) | 1595 if (obj.is_null()) |
(...skipping 24 matching lines...) Expand all Loading... |
1615 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1620 reinterpret_cast<ui::WindowAndroid*>(window_android), |
1616 retained_objects_set); | 1621 retained_objects_set); |
1617 return reinterpret_cast<intptr_t>(view); | 1622 return reinterpret_cast<intptr_t>(view); |
1618 } | 1623 } |
1619 | 1624 |
1620 bool RegisterContentViewCore(JNIEnv* env) { | 1625 bool RegisterContentViewCore(JNIEnv* env) { |
1621 return RegisterNativesImpl(env); | 1626 return RegisterNativesImpl(env); |
1622 } | 1627 } |
1623 | 1628 |
1624 } // namespace content | 1629 } // namespace content |
OLD | NEW |