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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 #include "content/renderer/media/webmediaplayer_params.h" | 107 #include "content/renderer/media/webmediaplayer_params.h" |
108 #include "content/renderer/mhtml_generator.h" | 108 #include "content/renderer/mhtml_generator.h" |
109 #include "content/renderer/notification_provider.h" | 109 #include "content/renderer/notification_provider.h" |
110 #include "content/renderer/render_frame_impl.h" | 110 #include "content/renderer/render_frame_impl.h" |
111 #include "content/renderer/render_process.h" | 111 #include "content/renderer/render_process.h" |
112 #include "content/renderer/render_thread_impl.h" | 112 #include "content/renderer/render_thread_impl.h" |
113 #include "content/renderer/render_view_impl_params.h" | 113 #include "content/renderer/render_view_impl_params.h" |
114 #include "content/renderer/render_view_mouse_lock_dispatcher.h" | 114 #include "content/renderer/render_view_mouse_lock_dispatcher.h" |
115 #include "content/renderer/render_widget_fullscreen_pepper.h" | 115 #include "content/renderer/render_widget_fullscreen_pepper.h" |
116 #include "content/renderer/renderer_date_time_picker.h" | 116 #include "content/renderer/renderer_date_time_picker.h" |
117 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | |
118 #include "content/renderer/renderer_webcolorchooser_impl.h" | 117 #include "content/renderer/renderer_webcolorchooser_impl.h" |
119 #include "content/renderer/savable_resources.h" | 118 #include "content/renderer/savable_resources.h" |
120 #include "content/renderer/speech_recognition_dispatcher.h" | 119 #include "content/renderer/speech_recognition_dispatcher.h" |
121 #include "content/renderer/stats_collection_controller.h" | 120 #include "content/renderer/stats_collection_controller.h" |
122 #include "content/renderer/stats_collection_observer.h" | 121 #include "content/renderer/stats_collection_observer.h" |
123 #include "content/renderer/text_input_client_observer.h" | 122 #include "content/renderer/text_input_client_observer.h" |
124 #include "content/renderer/v8_value_converter_impl.h" | 123 #include "content/renderer/v8_value_converter_impl.h" |
125 #include "content/renderer/web_ui_extension.h" | 124 #include "content/renderer/web_ui_extension.h" |
126 #include "content/renderer/web_ui_extension_data.h" | 125 #include "content/renderer/web_ui_extension_data.h" |
127 #include "content/renderer/websharedworker_proxy.h" | 126 #include "content/renderer/websharedworker_proxy.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 #include "content/renderer/pepper/pepper_plugin_registry.h" | 247 #include "content/renderer/pepper/pepper_plugin_registry.h" |
249 #include "content/renderer/pepper/pepper_webplugin_impl.h" | 248 #include "content/renderer/pepper/pepper_webplugin_impl.h" |
250 #include "content/renderer/pepper/plugin_module.h" | 249 #include "content/renderer/pepper/plugin_module.h" |
251 #endif | 250 #endif |
252 | 251 |
253 #if defined(ENABLE_WEBRTC) | 252 #if defined(ENABLE_WEBRTC) |
254 #include "content/renderer/media/rtc_peer_connection_handler.h" | 253 #include "content/renderer/media/rtc_peer_connection_handler.h" |
255 #endif | 254 #endif |
256 | 255 |
257 using WebKit::WebAXObject; | 256 using WebKit::WebAXObject; |
258 using WebKit::WebApplicationCacheHost; | |
259 using WebKit::WebApplicationCacheHostClient; | |
260 using WebKit::WebCString; | 257 using WebKit::WebCString; |
261 using WebKit::WebColor; | 258 using WebKit::WebColor; |
262 using WebKit::WebColorName; | 259 using WebKit::WebColorName; |
263 using WebKit::WebConsoleMessage; | 260 using WebKit::WebConsoleMessage; |
264 using WebKit::WebContextMenuData; | 261 using WebKit::WebContextMenuData; |
265 using WebKit::WebCookieJar; | 262 using WebKit::WebCookieJar; |
266 using WebKit::WebData; | 263 using WebKit::WebData; |
267 using WebKit::WebDataSource; | 264 using WebKit::WebDataSource; |
268 using WebKit::WebDocument; | 265 using WebKit::WebDocument; |
269 using WebKit::WebDOMEvent; | 266 using WebKit::WebDOMEvent; |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 567 |
571 // Returns true if the device scale is high enough that losing subpixel | 568 // Returns true if the device scale is high enough that losing subpixel |
572 // antialiasing won't have a noticeable effect on text quality. | 569 // antialiasing won't have a noticeable effect on text quality. |
573 static bool DeviceScaleEnsuresTextQuality(float device_scale_factor) { | 570 static bool DeviceScaleEnsuresTextQuality(float device_scale_factor) { |
574 #if defined(OS_ANDROID) | 571 #if defined(OS_ANDROID) |
575 // On Android, we never have subpixel antialiasing. | 572 // On Android, we never have subpixel antialiasing. |
576 return true; | 573 return true; |
577 #else | 574 #else |
578 return device_scale_factor > 1.5f; | 575 return device_scale_factor > 1.5f; |
579 #endif | 576 #endif |
580 | |
581 } | 577 } |
582 | 578 |
583 static bool ShouldUseFixedPositionCompositing(float device_scale_factor) { | 579 static bool ShouldUseFixedPositionCompositing(float device_scale_factor) { |
584 // Compositing for fixed-position elements is dependent on | 580 // Compositing for fixed-position elements is dependent on |
585 // device_scale_factor if no flag is set. http://crbug.com/172738 | 581 // device_scale_factor if no flag is set. http://crbug.com/172738 |
586 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 582 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
587 | 583 |
588 if (command_line.HasSwitch(switches::kDisableCompositingForFixedPosition)) | 584 if (command_line.HasSwitch(switches::kDisableCompositingForFixedPosition)) |
589 return false; | 585 return false; |
590 | 586 |
(...skipping 5992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6583 for (size_t i = 0; i < icon_urls.size(); i++) { | 6579 for (size_t i = 0; i < icon_urls.size(); i++) { |
6584 WebURL url = icon_urls[i].iconURL(); | 6580 WebURL url = icon_urls[i].iconURL(); |
6585 if (!url.isEmpty()) | 6581 if (!url.isEmpty()) |
6586 urls.push_back(FaviconURL(url, | 6582 urls.push_back(FaviconURL(url, |
6587 ToFaviconType(icon_urls[i].iconType()))); | 6583 ToFaviconType(icon_urls[i].iconType()))); |
6588 } | 6584 } |
6589 SendUpdateFaviconURL(urls); | 6585 SendUpdateFaviconURL(urls); |
6590 } | 6586 } |
6591 | 6587 |
6592 } // namespace content | 6588 } // namespace content |
OLD | NEW |