Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 2842693005: Store physical backing size in ViewAndroid (Closed)
Patch Set: no cvc/eventf Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "android_webview/browser/aw_browser_context.h" 10 #include "android_webview/browser/aw_browser_context.h"
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 anchor_text = ConvertUTF16ToJavaString(env, data.anchor_text); 853 anchor_text = ConvertUTF16ToJavaString(env, data.anchor_text);
854 854
855 ScopedJavaLocalRef<jstring> img_src; 855 ScopedJavaLocalRef<jstring> img_src;
856 if (data.img_src.is_valid()) 856 if (data.img_src.is_valid())
857 img_src = ConvertUTF8ToJavaString(env, data.img_src.spec()); 857 img_src = ConvertUTF8ToJavaString(env, data.img_src.spec());
858 858
859 Java_AwContents_updateHitTestData(env, obj, data.type, extra_data_for_type, 859 Java_AwContents_updateHitTestData(env, obj, data.type, extra_data_for_type,
860 href, anchor_text, img_src); 860 href, anchor_text, img_src);
861 } 861 }
862 862
863 void AwContents::OnPhysicalBackingSizeChanged(JNIEnv* env,
864 const JavaParamRef<jobject>& obj,
865 jint width,
866 jint height) {
867 DCHECK_CURRENTLY_ON(BrowserThread::UI);
868 gfx::Size size(width, height);
869 web_contents_->GetNativeView()->OnPhysicalBackingSizeChanged(size);
870 }
871
863 void AwContents::OnSizeChanged(JNIEnv* env, 872 void AwContents::OnSizeChanged(JNIEnv* env,
864 const JavaParamRef<jobject>& obj, 873 const JavaParamRef<jobject>& obj,
865 int w, 874 int w,
866 int h, 875 int h,
867 int ow, 876 int ow,
868 int oh) { 877 int oh) {
869 DCHECK_CURRENTLY_ON(BrowserThread::UI); 878 DCHECK_CURRENTLY_ON(BrowserThread::UI);
870 browser_view_renderer_.OnSizeChanged(w, h); 879 browser_view_renderer_.OnSizeChanged(w, h);
871 } 880 }
872 881
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 1458
1450 return Java_AwContents_onRenderProcessGoneDetail(env, obj, 1459 return Java_AwContents_onRenderProcessGoneDetail(env, obj,
1451 child_process_id, crashed); 1460 child_process_id, crashed);
1452 } 1461 }
1453 1462
1454 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { 1463 void AwContents::RenderProcessReady(content::RenderProcessHost* host) {
1455 UpdateRendererPriority(); 1464 UpdateRendererPriority();
1456 } 1465 }
1457 1466
1458 } // namespace android_webview 1467 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698