OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/public/common/renderer_preferences.h" | 5 #include "content/public/common/renderer_preferences.h" |
6 | 6 |
7 #include "third_party/skia/include/core/SkColor.h" | 7 #include "third_party/skia/include/core/SkColor.h" |
8 #include "ui/gfx/font_render_params.h" | 8 #include "ui/gfx/font_render_params.h" |
9 | 9 |
10 namespace { | |
11 // The touchpad / touchscreen fling profiles are a matched set | |
12 // determined via UX experimentation. Do not modify without | |
13 // first discussing with rjkroege@chromium.org or | |
14 // wjmaclean@chromium.org. | |
15 const float kDefaultAlpha = -5.70762e+03f; | |
16 const float kDefaultBeta = 1.72e+02f; | |
17 const float kDefaultGamma = 3.7e+00f; | |
18 } | |
19 | |
20 namespace content { | 10 namespace content { |
21 | 11 |
22 RendererPreferences::RendererPreferences() | 12 RendererPreferences::RendererPreferences() |
23 : can_accept_load_drops(true), | 13 : can_accept_load_drops(true), |
24 should_antialias_text(true), | 14 should_antialias_text(true), |
25 hinting(gfx::FontRenderParams::HINTING_MEDIUM), | 15 hinting(gfx::FontRenderParams::HINTING_MEDIUM), |
26 use_autohinter(false), | 16 use_autohinter(false), |
27 use_bitmaps(false), | 17 use_bitmaps(false), |
28 subpixel_rendering(gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE), | 18 subpixel_rendering(gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE), |
29 use_subpixel_positioning(false), | 19 use_subpixel_positioning(false), |
30 focus_ring_color(SkColorSetARGB(255, 229, 151, 0)), | 20 focus_ring_color(SkColorSetARGB(255, 229, 151, 0)), |
31 thumb_active_color(SkColorSetRGB(244, 244, 244)), | 21 thumb_active_color(SkColorSetRGB(244, 244, 244)), |
32 thumb_inactive_color(SkColorSetRGB(234, 234, 234)), | 22 thumb_inactive_color(SkColorSetRGB(234, 234, 234)), |
33 track_color(SkColorSetRGB(211, 211, 211)), | 23 track_color(SkColorSetRGB(211, 211, 211)), |
34 active_selection_bg_color(SkColorSetRGB(30, 144, 255)), | 24 active_selection_bg_color(SkColorSetRGB(30, 144, 255)), |
35 active_selection_fg_color(SK_ColorWHITE), | 25 active_selection_fg_color(SK_ColorWHITE), |
36 inactive_selection_bg_color(SkColorSetRGB(200, 200, 200)), | 26 inactive_selection_bg_color(SkColorSetRGB(200, 200, 200)), |
37 inactive_selection_fg_color(SkColorSetRGB(50, 50, 50)), | 27 inactive_selection_fg_color(SkColorSetRGB(50, 50, 50)), |
38 browser_handles_non_local_top_level_requests(false), | 28 browser_handles_non_local_top_level_requests(false), |
39 browser_handles_all_top_level_requests(false), | 29 browser_handles_all_top_level_requests(false), |
40 caret_blink_interval(0.5), | 30 caret_blink_interval(0.5), |
41 use_custom_colors(true), | 31 use_custom_colors(true), |
42 enable_referrers(true), | 32 enable_referrers(true), |
43 enable_do_not_track(false), | 33 enable_do_not_track(false), |
44 default_zoom_level(0), | 34 default_zoom_level(0), |
45 report_frame_name_changes(false), | 35 report_frame_name_changes(false), |
46 touchpad_fling_profile(3), | |
47 touchscreen_fling_profile(3), | |
48 tap_multiple_targets_strategy(TAP_MULTIPLE_TARGETS_STRATEGY_POPUP), | 36 tap_multiple_targets_strategy(TAP_MULTIPLE_TARGETS_STRATEGY_POPUP), |
49 disable_client_blocked_error_page(false), | 37 disable_client_blocked_error_page(false), |
50 plugin_fullscreen_allowed(true), | 38 plugin_fullscreen_allowed(true), |
51 use_video_overlay_for_embedded_encrypted_video(false) { | 39 use_video_overlay_for_embedded_encrypted_video(false) { |
52 touchpad_fling_profile[0] = kDefaultAlpha; | |
53 touchpad_fling_profile[1] = kDefaultBeta; | |
54 touchpad_fling_profile[2] = kDefaultGamma; | |
55 touchscreen_fling_profile = touchpad_fling_profile; | |
56 } | 40 } |
57 | 41 |
58 RendererPreferences::~RendererPreferences() { } | 42 RendererPreferences::~RendererPreferences() { } |
59 | 43 |
60 } // namespace content | 44 } // namespace content |
OLD | NEW |