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

Side by Side Diff: content/browser/android/content_view_core_impl.h

Issue 2202123002: Make WebView respond to device scale change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made WindowAndroid::content_offset() device scale independent, restored AwContents.onSizeChanged(),… Created 4 years, 4 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 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 void SetMultiTouchZoomSupportEnabled( 221 void SetMultiTouchZoomSupportEnabled(
222 JNIEnv* env, 222 JNIEnv* env,
223 const base::android::JavaParamRef<jobject>& obj, 223 const base::android::JavaParamRef<jobject>& obj,
224 jboolean enabled); 224 jboolean enabled);
225 225
226 long GetNativeImeAdapter(JNIEnv* env, 226 long GetNativeImeAdapter(JNIEnv* env,
227 const base::android::JavaParamRef<jobject>& obj); 227 const base::android::JavaParamRef<jobject>& obj);
228 void SetFocus(JNIEnv* env, 228 void SetFocus(JNIEnv* env,
229 const base::android::JavaParamRef<jobject>& obj, 229 const base::android::JavaParamRef<jobject>& obj,
230 jboolean focused); 230 jboolean focused);
231 void SetDeviceScaleFactor(JNIEnv* env,
232 const base::android::JavaParamRef<jobject>& obj,
233 jfloat device_scale);
231 234
232 jint GetBackgroundColor(JNIEnv* env, jobject obj); 235 jint GetBackgroundColor(JNIEnv* env, jobject obj);
233 void SetAllowJavascriptInterfacesInspection( 236 void SetAllowJavascriptInterfacesInspection(
234 JNIEnv* env, 237 JNIEnv* env,
235 const base::android::JavaParamRef<jobject>& obj, 238 const base::android::JavaParamRef<jobject>& obj,
236 jboolean allow); 239 jboolean allow);
237 void AddJavascriptInterface( 240 void AddJavascriptInterface(
238 JNIEnv* env, 241 JNIEnv* env,
239 const base::android::JavaParamRef<jobject>& obj, 242 const base::android::JavaParamRef<jobject>& obj,
240 const base::android::JavaParamRef<jobject>& object, 243 const base::android::JavaParamRef<jobject>& object,
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 ui::ViewAndroid view_; 455 ui::ViewAndroid view_;
453 456
454 // Reference to the current WebContents used to determine how and what to 457 // Reference to the current WebContents used to determine how and what to
455 // display in the ContentViewCore. 458 // display in the ContentViewCore.
456 WebContentsImpl* web_contents_; 459 WebContentsImpl* web_contents_;
457 460
458 // Page scale factor. 461 // Page scale factor.
459 float page_scale_; 462 float page_scale_;
460 463
461 // Device scale factor. 464 // Device scale factor.
462 const float dpi_scale_; 465 float dpi_scale_;
463 466
464 // Observer to notify of lifecyle changes. 467 // Observer to notify of lifecyle changes.
465 base::ObserverList<ContentViewCoreImplObserver> observer_list_; 468 base::ObserverList<ContentViewCoreImplObserver> observer_list_;
466 469
467 // The cache of device's current orientation set from Java side, this value 470 // The cache of device's current orientation set from Java side, this value
468 // will be sent to Renderer once it is ready. 471 // will be sent to Renderer once it is ready.
469 int device_orientation_; 472 int device_orientation_;
470 473
471 bool accessibility_enabled_; 474 bool accessibility_enabled_;
472 475
473 // Manages injecting Java objects. 476 // Manages injecting Java objects.
474 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; 477 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_;
475 478
476 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 479 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
477 }; 480 };
478 481
479 bool RegisterContentViewCore(JNIEnv* env); 482 bool RegisterContentViewCore(JNIEnv* env);
480 483
481 } // namespace content 484 } // namespace content
482 485
483 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 486 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698