Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / components / dom_distiller / android / java / src / org / chromium / components / dom_distiller / core / FontFamily.template
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
3 // found in the LICENSE file.
4
5 package org.chromium.components.dom_distiller.core;
6
7 // An auto-generated enum for Font Family preferences as used by
8 // org.chromium.components.dom_distiller.core.DistilledPagePrefs and
9 // the corresponding native class
10 // dom_distiller::android::DistilledPagePrefsAndroid
11 public enum FontFamily {
12
13 #define DEFINE_FONT_FAMILY(name, value) name(value),
14 #include "components/dom_distiller/core/font_family_list.h"
15 #undef DEFINE_FONT_FAMILY
16 ;
17
18 private final int mFontFamily;
19
20 private FontFamily(int value) {
21   mFontFamily = value;
22 }
23
24 int asNativeEnum() {
25   return mFontFamily;
26 }
27
28 public static FontFamily getFontFamilyForValue(int value) {
29   for (FontFamily fontFamily: FontFamily.values()) {
30     if (fontFamily.mFontFamily == value) {
31       return fontFamily;
32     }
33   }
34   return null;
35 }
36
37 }