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 "android_webview/native/aw_contents.h" | 5 #include "android_webview/native/aw_contents.h" |
6 | 6 |
7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/browser/aw_browser_main_parts.h" | 8 #include "android_webview/browser/aw_browser_main_parts.h" |
9 #include "android_webview/browser/gpu_memory_buffer_impl.h" | 9 #include "android_webview/browser/gpu_memory_buffer_impl.h" |
10 #include "android_webview/browser/in_process_view_renderer.h" | 10 #include "android_webview/browser/in_process_view_renderer.h" |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 base::MessageLoop::current()->DeleteSoon(FROM_HERE, pending.release()); | 669 base::MessageLoop::current()->DeleteSoon(FROM_HERE, pending.release()); |
670 return; | 670 return; |
671 } | 671 } |
672 pending_contents_.reset(new AwContents(pending.Pass())); | 672 pending_contents_.reset(new AwContents(pending.Pass())); |
673 } | 673 } |
674 | 674 |
675 void AwContents::FocusFirstNode(JNIEnv* env, jobject obj) { | 675 void AwContents::FocusFirstNode(JNIEnv* env, jobject obj) { |
676 web_contents_->FocusThroughTabTraversal(false); | 676 web_contents_->FocusThroughTabTraversal(false); |
677 } | 677 } |
678 | 678 |
| 679 void AwContents::SetBackgroundColor(JNIEnv* env, jobject obj, jint color) { |
| 680 render_view_host_ext_->SetBackgroundColor(color); |
| 681 } |
| 682 |
679 jint AwContents::ReleasePopupAwContents(JNIEnv* env, jobject obj) { | 683 jint AwContents::ReleasePopupAwContents(JNIEnv* env, jobject obj) { |
680 return reinterpret_cast<jint>(pending_contents_.release()); | 684 return reinterpret_cast<jint>(pending_contents_.release()); |
681 } | 685 } |
682 | 686 |
683 gfx::Point AwContents::GetLocationOnScreen() { | 687 gfx::Point AwContents::GetLocationOnScreen() { |
684 JNIEnv* env = AttachCurrentThread(); | 688 JNIEnv* env = AttachCurrentThread(); |
685 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 689 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
686 if (obj.is_null()) | 690 if (obj.is_null()) |
687 return gfx::Point(); | 691 return gfx::Point(); |
688 std::vector<int> location; | 692 std::vector<int> location; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 return browser_view_renderer_->CapturePicture(); | 744 return browser_view_renderer_->CapturePicture(); |
741 } | 745 } |
742 | 746 |
743 void AwContents::EnableOnNewPicture(JNIEnv* env, | 747 void AwContents::EnableOnNewPicture(JNIEnv* env, |
744 jobject obj, | 748 jobject obj, |
745 jboolean enabled) { | 749 jboolean enabled) { |
746 browser_view_renderer_->EnableOnNewPicture(enabled); | 750 browser_view_renderer_->EnableOnNewPicture(enabled); |
747 } | 751 } |
748 | 752 |
749 } // namespace android_webview | 753 } // namespace android_webview |
OLD | NEW |