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.
5 #include "content/renderer/pepper/ppapi_preferences_builder.h"
7 #include "content/public/common/web_preferences.h"
8 #include "ppapi/shared_impl/ppapi_preferences.h"
12 ppapi::Preferences
PpapiPreferencesBuilder::Build(
13 const WebPreferences
& prefs
) {
14 ppapi::Preferences ppapi_prefs
;
15 ppapi_prefs
.standard_font_family_map
= prefs
.standard_font_family_map
;
16 ppapi_prefs
.fixed_font_family_map
= prefs
.fixed_font_family_map
;
17 ppapi_prefs
.serif_font_family_map
= prefs
.serif_font_family_map
;
18 ppapi_prefs
.sans_serif_font_family_map
= prefs
.sans_serif_font_family_map
;
19 ppapi_prefs
.default_font_size
= prefs
.default_font_size
;
20 ppapi_prefs
.default_fixed_font_size
= prefs
.default_fixed_font_size
;
21 ppapi_prefs
.number_of_cpu_cores
= prefs
.number_of_cpu_cores
;
22 ppapi_prefs
.is_3d_supported
= prefs
.flash_3d_enabled
;
23 ppapi_prefs
.is_stage3d_supported
= prefs
.flash_stage3d_enabled
;
24 ppapi_prefs
.is_stage3d_baseline_supported
=
25 prefs
.flash_stage3d_baseline_enabled
;
26 ppapi_prefs
.is_webgl_supported
= prefs
.experimental_webgl_enabled
;
27 ppapi_prefs
.is_accelerated_video_decode_enabled
=
28 prefs
.pepper_accelerated_video_decode_enabled
;
32 } // namespace content