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

Side by Side Diff: content/public/common/web_preferences.cc

Issue 685153003: Pointer/hover media query support: platform-independent changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, nuked content::{Pointer,Hover}Type Created 6 years, 1 month 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
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 #include "content/public/common/web_preferences.h" 5 #include "content/public/common/web_preferences.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "third_party/WebKit/public/web/WebSettings.h" 10 #include "third_party/WebKit/public/web/WebSettings.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 COMPILE_ASSERT_MATCHING_ENUMS( 45 COMPILE_ASSERT_MATCHING_ENUMS(
46 V8_SCRIPT_STREAMING_MODE_ONLY_ASYNC_AND_DEFER, 46 V8_SCRIPT_STREAMING_MODE_ONLY_ASYNC_AND_DEFER,
47 WebSettings::V8ScriptStreamingModeOnlyAsyncAndDefer); 47 WebSettings::V8ScriptStreamingModeOnlyAsyncAndDefer);
48 COMPILE_ASSERT_MATCHING_ENUMS( 48 COMPILE_ASSERT_MATCHING_ENUMS(
49 V8_SCRIPT_STREAMING_MODE_ALL_PLUS_BLOCK_PARSER_BLOCKING, 49 V8_SCRIPT_STREAMING_MODE_ALL_PLUS_BLOCK_PARSER_BLOCKING,
50 WebSettings::V8ScriptStreamingModeAllPlusBlockParsingBlocking); 50 WebSettings::V8ScriptStreamingModeAllPlusBlockParsingBlocking);
51 COMPILE_ASSERT_MATCHING_ENUMS( 51 COMPILE_ASSERT_MATCHING_ENUMS(
52 V8_SCRIPT_STREAMING_MODE_LAST, 52 V8_SCRIPT_STREAMING_MODE_LAST,
53 WebSettings::V8ScriptStreamingModeAllPlusBlockParsingBlocking); 53 WebSettings::V8ScriptStreamingModeAllPlusBlockParsingBlocking);
54 54
55 COMPILE_ASSERT_MATCHING_ENUMS(ui::PointerTypeNone,
mustaq 2014/11/11 15:41:41 Not sure what's the best place for these checks. A
56 WebSettings::PointerTypeNone);
57 COMPILE_ASSERT_MATCHING_ENUMS(ui::PointerTypeCoarse,
58 WebSettings::PointerTypeCoarse);
59 COMPILE_ASSERT_MATCHING_ENUMS(ui::PointerTypeFine,
60 WebSettings::PointerTypeFine);
61
62 COMPILE_ASSERT_MATCHING_ENUMS(ui::HoverTypeNone,
63 WebSettings::HoverTypeNone);
64 COMPILE_ASSERT_MATCHING_ENUMS(ui::HoverTypeOnDemand,
65 WebSettings::HoverTypeOnDemand);
66 COMPILE_ASSERT_MATCHING_ENUMS(ui::HoverTypeHover,
67 WebSettings::HoverTypeHover);
68
55 WebPreferences::WebPreferences() 69 WebPreferences::WebPreferences()
56 : default_font_size(16), 70 : default_font_size(16),
57 default_fixed_font_size(13), 71 default_fixed_font_size(13),
58 minimum_font_size(0), 72 minimum_font_size(0),
59 minimum_logical_font_size(6), 73 minimum_logical_font_size(6),
60 default_encoding("ISO-8859-1"), 74 default_encoding("ISO-8859-1"),
61 javascript_enabled(true), 75 javascript_enabled(true),
62 web_security_enabled(true), 76 web_security_enabled(true),
63 javascript_can_open_windows_automatically(true), 77 javascript_can_open_windows_automatically(true),
64 loads_images_automatically(true), 78 loads_images_automatically(true),
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 password_echo_enabled(false), 126 password_echo_enabled(false),
113 should_print_backgrounds(false), 127 should_print_backgrounds(false),
114 should_clear_document_background(true), 128 should_clear_document_background(true),
115 enable_scroll_animator(false), 129 enable_scroll_animator(false),
116 region_based_columns_enabled(false), 130 region_based_columns_enabled(false),
117 touch_enabled(false), 131 touch_enabled(false),
118 device_supports_touch(false), 132 device_supports_touch(false),
119 device_supports_mouse(true), 133 device_supports_mouse(true),
120 touch_adjustment_enabled(true), 134 touch_adjustment_enabled(true),
121 pointer_events_max_touch_points(0), 135 pointer_events_max_touch_points(0),
136 available_pointer_types(0),
137 primary_pointer_type(ui::PointerTypeNone),
138 available_hover_types(0),
139 primary_hover_type(ui::HoverTypeNone),
122 sync_xhr_in_documents_enabled(true), 140 sync_xhr_in_documents_enabled(true),
123 deferred_image_decoding_enabled(false), 141 deferred_image_decoding_enabled(false),
124 image_color_profiles_enabled(false), 142 image_color_profiles_enabled(false),
125 should_respect_image_orientation(false), 143 should_respect_image_orientation(false),
126 number_of_cpu_cores(1), 144 number_of_cpu_cores(1),
127 #if defined(OS_MACOSX) 145 #if defined(OS_MACOSX)
128 editing_behavior(EDITING_BEHAVIOR_MAC), 146 editing_behavior(EDITING_BEHAVIOR_MAC),
129 #elif defined(OS_WIN) 147 #elif defined(OS_WIN)
130 editing_behavior(EDITING_BEHAVIOR_WIN), 148 editing_behavior(EDITING_BEHAVIOR_WIN),
131 #elif defined(OS_ANDROID) 149 #elif defined(OS_ANDROID)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script"); 205 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script");
188 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact"); 206 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact");
189 pictograph_font_family_map[kCommonScript] = 207 pictograph_font_family_map[kCommonScript] =
190 base::ASCIIToUTF16("Times New Roman"); 208 base::ASCIIToUTF16("Times New Roman");
191 } 209 }
192 210
193 WebPreferences::~WebPreferences() { 211 WebPreferences::~WebPreferences() {
194 } 212 }
195 213
196 } // namespace content 214 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698