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

Unified Diff: android_webview/native/aw_settings.h

Issue 14271024: [Android WebView] Move the most of WebSettings into AwSettings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated findbugs issues Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_settings.h
diff --git a/android_webview/native/aw_settings.h b/android_webview/native/aw_settings.h
index a8658c8cd429cac09197c39558a99b4ab82ee722..d24df562b84e2d007626d7662738ada16cc9411f 100644
--- a/android_webview/native/aw_settings.h
+++ b/android_webview/native/aw_settings.h
@@ -9,6 +9,7 @@
#include "base/android/jni_helper.h"
#include "base/android/scoped_java_ref.h"
+#include "base/memory/scoped_ptr.h"
#include "content/public/browser/web_contents_observer.h"
namespace android_webview {
@@ -23,25 +24,27 @@ class AwSettings : public content::WebContentsObserver {
// Called from Java.
void Destroy(JNIEnv* env, jobject obj);
void ResetScrollAndScaleState(JNIEnv* env, jobject obj);
- void SetInitialPageScale(JNIEnv* env, jobject obj, jfloat page_scale_percent);
- void SetTextZoom(JNIEnv* env, jobject obj, jint text_zoom_percent);
void SetWebContents(JNIEnv* env, jobject obj, jint web_contents);
+ void UpdateEverything(JNIEnv* env, jobject obj);
+ void UpdateInitialPageScale(JNIEnv* env, jobject obj);
+ void UpdateUserAgent(JNIEnv* env, jobject obj);
+ void UpdateWebkitPreferences(JNIEnv* env, jobject obj);
private:
+ struct FieldIds;
+
AwRenderViewHostExt* GetAwRenderViewHostExt();
- void UpdateInitialPageScale();
- void UpdateTextZoom();
- void UpdatePreferredSizeMode(content::RenderViewHost* render_view_host);
- void UpdateRenderViewHostExtSettings();
- void UpdateRenderViewHostSettings(content::RenderViewHost* render_view_host);
+ void UpdateEverything();
+ void UpdatePreferredSizeMode();
// WebContentsObserver overrides:
virtual void RenderViewCreated(
content::RenderViewHost* render_view_host) OVERRIDE;
- JavaObjectWeakGlobalRef java_ref_;
- float initial_page_scale_percent_;
- int text_zoom_percent_;
+ // Java field references for accessing the values in the Java object.
+ scoped_ptr<FieldIds> field_ids_;
+
+ JavaObjectWeakGlobalRef aw_settings_;
};
bool RegisterAwSettings(JNIEnv* env);

Powered by Google App Engine
This is Rietveld 408576698