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

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: Combined two setSize methods again with question Created 4 years, 3 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ui::ViewAndroid view_; 456 ui::ViewAndroid view_;
454 457
455 // Reference to the current WebContents used to determine how and what to 458 // Reference to the current WebContents used to determine how and what to
456 // display in the ContentViewCore. 459 // display in the ContentViewCore.
457 WebContentsImpl* web_contents_; 460 WebContentsImpl* web_contents_;
458 461
459 // Page scale factor. 462 // Page scale factor.
460 float page_scale_; 463 float page_scale_;
461 464
462 // Device scale factor. 465 // Device scale factor.
463 const float dpi_scale_; 466 float dpi_scale_;
464 467
465 // Observer to notify of lifecyle changes. 468 // Observer to notify of lifecyle changes.
466 base::ObserverList<ContentViewCoreImplObserver> observer_list_; 469 base::ObserverList<ContentViewCoreImplObserver> observer_list_;
467 470
468 // The cache of device's current orientation set from Java side, this value 471 // The cache of device's current orientation set from Java side, this value
469 // will be sent to Renderer once it is ready. 472 // will be sent to Renderer once it is ready.
470 int device_orientation_; 473 int device_orientation_;
471 474
472 bool accessibility_enabled_; 475 bool accessibility_enabled_;
473 476
474 // Manages injecting Java objects. 477 // Manages injecting Java objects.
475 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; 478 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_;
476 479
477 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 480 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
478 }; 481 };
479 482
480 bool RegisterContentViewCore(JNIEnv* env); 483 bool RegisterContentViewCore(JNIEnv* env);
481 484
482 } // namespace content 485 } // namespace content
483 486
484 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 487 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698