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

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

Issue 2300463002: Add observers for DIP scale change. (Closed)
Patch Set: Addressed comments, more questions. 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 231
232 void SetDIPScale(JNIEnv* env,
233 const base::android::JavaParamRef<jobject>& obj,
234 jfloat dipScale);
235
232 jint GetBackgroundColor(JNIEnv* env, jobject obj); 236 jint GetBackgroundColor(JNIEnv* env, jobject obj);
233 void SetAllowJavascriptInterfacesInspection( 237 void SetAllowJavascriptInterfacesInspection(
234 JNIEnv* env, 238 JNIEnv* env,
235 const base::android::JavaParamRef<jobject>& obj, 239 const base::android::JavaParamRef<jobject>& obj,
236 jboolean allow); 240 jboolean allow);
237 void AddJavascriptInterface( 241 void AddJavascriptInterface(
238 JNIEnv* env, 242 JNIEnv* env,
239 const base::android::JavaParamRef<jobject>& obj, 243 const base::android::JavaParamRef<jobject>& obj,
240 const base::android::JavaParamRef<jobject>& object, 244 const base::android::JavaParamRef<jobject>& object,
241 const base::android::JavaParamRef<jstring>& name, 245 const base::android::JavaParamRef<jstring>& name,
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ui::ViewAndroid view_; 457 ui::ViewAndroid view_;
454 458
455 // Reference to the current WebContents used to determine how and what to 459 // Reference to the current WebContents used to determine how and what to
456 // display in the ContentViewCore. 460 // display in the ContentViewCore.
457 WebContentsImpl* web_contents_; 461 WebContentsImpl* web_contents_;
458 462
459 // Page scale factor. 463 // Page scale factor.
460 float page_scale_; 464 float page_scale_;
461 465
462 // Device scale factor. 466 // Device scale factor.
463 const float dpi_scale_; 467 float dpi_scale_;
464 468
465 // Observer to notify of lifecyle changes. 469 // Observer to notify of lifecyle changes.
466 base::ObserverList<ContentViewCoreImplObserver> observer_list_; 470 base::ObserverList<ContentViewCoreImplObserver> observer_list_;
467 471
468 // The cache of device's current orientation set from Java side, this value 472 // The cache of device's current orientation set from Java side, this value
469 // will be sent to Renderer once it is ready. 473 // will be sent to Renderer once it is ready.
470 int device_orientation_; 474 int device_orientation_;
471 475
472 bool accessibility_enabled_; 476 bool accessibility_enabled_;
473 477
474 // Manages injecting Java objects. 478 // Manages injecting Java objects.
475 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; 479 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_;
476 480
477 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 481 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
478 }; 482 };
479 483
480 bool RegisterContentViewCore(JNIEnv* env); 484 bool RegisterContentViewCore(JNIEnv* env);
481 485
482 } // namespace content 486 } // namespace content
483 487
484 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 488 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698