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

Side by Side Diff: components/dom_distiller/core/distilled_page_prefs_android.h

Issue 430473007: Font Family Preferences for Distilled Pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: synced Created 6 years, 4 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_ANDROID_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_ANDROID_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_ANDROID_H_ 6 #define COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
11 #include "components/dom_distiller/core/distilled_page_prefs.h" 11 #include "components/dom_distiller/core/distilled_page_prefs.h"
12 12
13 namespace dom_distiller { 13 namespace dom_distiller {
14 namespace android { 14 namespace android {
15 15
16 class DistilledPagePrefsAndroid { 16 class DistilledPagePrefsAndroid {
17 public: 17 public:
18 DistilledPagePrefsAndroid(JNIEnv* env, 18 DistilledPagePrefsAndroid(JNIEnv* env,
19 jobject obj, 19 jobject obj,
20 DistilledPagePrefs* distilled_page_prefs_ptr); 20 DistilledPagePrefs* distilled_page_prefs_ptr);
21 virtual ~DistilledPagePrefsAndroid(); 21 virtual ~DistilledPagePrefsAndroid();
22 static bool Register(JNIEnv* env); 22 static bool Register(JNIEnv* env);
23 void SetFontFamily(JNIEnv* env, jobject obj, jint font_family);
24 jint GetFontFamily(JNIEnv* env, jobject obj);
23 void SetTheme(JNIEnv* env, jobject obj, jint theme); 25 void SetTheme(JNIEnv* env, jobject obj, jint theme);
24 jint GetTheme(JNIEnv* env, jobject obj); 26 jint GetTheme(JNIEnv* env, jobject obj);
27
25 void AddObserver(JNIEnv* env, jobject obj, jlong obs); 28 void AddObserver(JNIEnv* env, jobject obj, jlong obs);
26 void RemoveObserver(JNIEnv* env, jobject obj, jlong obs); 29 void RemoveObserver(JNIEnv* env, jobject obj, jlong obs);
27 30
28 private: 31 private:
29 DistilledPagePrefs* distilled_page_prefs_; 32 DistilledPagePrefs* distilled_page_prefs_;
30 33
31 DISALLOW_COPY_AND_ASSIGN(DistilledPagePrefsAndroid); 34 DISALLOW_COPY_AND_ASSIGN(DistilledPagePrefsAndroid);
32 }; 35 };
33 36
34 class DistilledPagePrefsObserverAndroid : public DistilledPagePrefs::Observer { 37 class DistilledPagePrefsObserverAndroid : public DistilledPagePrefs::Observer {
35 public: 38 public:
36 DistilledPagePrefsObserverAndroid(JNIEnv* env, jobject obj); 39 DistilledPagePrefsObserverAndroid(JNIEnv* env, jobject obj);
37 virtual ~DistilledPagePrefsObserverAndroid(); 40 virtual ~DistilledPagePrefsObserverAndroid();
38 41
39 // DistilledPagePrefs::Observer implementation. 42 // DistilledPagePrefs::Observer implementation.
43 virtual void OnChangeFontFamily(
44 DistilledPagePrefs::FontFamily new_font_family) OVERRIDE;
40 virtual void OnChangeTheme(DistilledPagePrefs::Theme new_theme) OVERRIDE; 45 virtual void OnChangeTheme(DistilledPagePrefs::Theme new_theme) OVERRIDE;
41 46
42 virtual void DestroyObserverAndroid(JNIEnv* env, jobject obj); 47 virtual void DestroyObserverAndroid(JNIEnv* env, jobject obj);
43 48
44 private: 49 private:
45 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 50 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
46 }; 51 };
47 52
48 } // namespace android 53 } // namespace android
49 } // namespace dom_distiller 54 } // namespace dom_distiller
50 55
51 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_ANDROID_H_ 56 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_ANDROID_H_
OLDNEW
« no previous file with comments | « components/dom_distiller/core/distilled_page_prefs.cc ('k') | components/dom_distiller/core/distilled_page_prefs_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698