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

Side by Side Diff: chrome/browser/accessibility/font_size_prefs_android.h

Issue 415343002: Upstream accessibility font size preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made callback methods private, test expect statements changed, styling Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_ANDROID_H_
6 #define CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_ANDROID_H_
7
8 #include <jni.h>
9 #include "base/android/scoped_java_ref.h"
10 #include "chrome/browser/accessibility/font_size_prefs.h"
11
12 class FontSizePrefsAndroid {
13 public:
14 FontSizePrefsAndroid(JNIEnv* env, jobject obj, Profile* profile);
15 ~FontSizePrefsAndroid();
16 void Destroy(JNIEnv* env, jobject obj);
17
18 void SetFontScaleFactor(JNIEnv* env, jobject obj, jfloat font);
19 float GetFontScaleFactor(JNIEnv* env, jobject obj);
20 void SetForceEnableZoom(JNIEnv* env, jobject obj, jboolean enabled);
21 bool GetForceEnableZoom(JNIEnv* env, jobject obj);
22
23 void AddObserver(JNIEnv* env, jobject obj, jlong obs);
24 void RemoveObserver(JNIEnv* env, jobject obj, jlong obs);
25
26 static bool Register(JNIEnv* env);
27
28 private:
29 FontSizePrefs* font_size_prefs_;
30
31 DISALLOW_COPY_AND_ASSIGN(FontSizePrefsAndroid);
32 };
33
34 class FontSizePrefsObserverAndroid : public FontSizePrefs::Observer {
35 public:
36 FontSizePrefsObserverAndroid(JNIEnv* env, jobject obj);
37 virtual ~FontSizePrefsObserverAndroid();
38 void DestroyObserverAndroid(JNIEnv* env, jobject obj);
39
40 static bool Register(JNIEnv* env);
41
42 // FontSizePrefs::Observer implementation.
43 virtual void OnChangeFontSize(float font) OVERRIDE;
44 // FontSizePrefs::Observer implementation.
robliao 2014/07/25 23:49:34 The above comment covers this so you can remove it
sunangel 2014/07/28 21:17:20 Done.
45 virtual void OnChangeForceEnableZoom(bool enabled) OVERRIDE;
46
47 private:
48 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
49 };
50
51 #endif // CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698