OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 ANDROID_WEBVIEW_NATIVE_AW_SETTINGS_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_SETTINGS_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_SETTINGS_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_SETTINGS_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_helper.h" | 10 #include "base/android/jni_helper.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 void Destroy(JNIEnv* env, jobject obj); | 24 void Destroy(JNIEnv* env, jobject obj); |
25 void ResetScrollAndScaleState(JNIEnv* env, jobject obj); | 25 void ResetScrollAndScaleState(JNIEnv* env, jobject obj); |
26 void SetInitialPageScale(JNIEnv* env, jobject obj, jfloat page_scale_percent); | 26 void SetInitialPageScale(JNIEnv* env, jobject obj, jfloat page_scale_percent); |
27 void SetTextZoom(JNIEnv* env, jobject obj, jint text_zoom_percent); | 27 void SetTextZoom(JNIEnv* env, jobject obj, jint text_zoom_percent); |
28 void SetWebContents(JNIEnv* env, jobject obj, jint web_contents); | 28 void SetWebContents(JNIEnv* env, jobject obj, jint web_contents); |
29 | 29 |
30 private: | 30 private: |
31 AwRenderViewHostExt* GetAwRenderViewHostExt(); | 31 AwRenderViewHostExt* GetAwRenderViewHostExt(); |
32 void UpdateInitialPageScale(); | 32 void UpdateInitialPageScale(); |
33 void UpdateTextZoom(); | 33 void UpdateTextZoom(); |
| 34 void UpdatePreferredSizeMode(content::RenderViewHost* render_view_host); |
| 35 void UpdateRenderViewHostExtSettings(); |
| 36 void UpdateRenderViewHostSettings(content::RenderViewHost* render_view_host); |
34 | 37 |
35 // WebContentsObserver overrides: | 38 // WebContentsObserver overrides: |
36 virtual void RenderViewCreated( | 39 virtual void RenderViewCreated( |
37 content::RenderViewHost* render_view_host) OVERRIDE; | 40 content::RenderViewHost* render_view_host) OVERRIDE; |
38 | 41 |
39 JavaObjectWeakGlobalRef java_ref_; | 42 JavaObjectWeakGlobalRef java_ref_; |
40 float initial_page_scale_percent_; | 43 float initial_page_scale_percent_; |
41 int text_zoom_percent_; | 44 int text_zoom_percent_; |
42 }; | 45 }; |
43 | 46 |
44 bool RegisterAwSettings(JNIEnv* env); | 47 bool RegisterAwSettings(JNIEnv* env); |
45 | 48 |
46 } // namespace android_webview | 49 } // namespace android_webview |
47 | 50 |
48 #endif // ANDROID_WEBVIEW_NATIVE_AW_SETTINGS_H_ | 51 #endif // ANDROID_WEBVIEW_NATIVE_AW_SETTINGS_H_ |
OLD | NEW |