| 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 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 // Enable deferred filter rendering if requested on the command line. | 1061 // Enable deferred filter rendering if requested on the command line. |
| 1062 settings->setDeferredFiltersEnabled(prefs.deferred_filters_enabled); | 1062 settings->setDeferredFiltersEnabled(prefs.deferred_filters_enabled); |
| 1063 | 1063 |
| 1064 // Enable container culling if requested on the command line. | 1064 // Enable container culling if requested on the command line. |
| 1065 settings->setContainerCullingEnabled(prefs.container_culling_enabled); | 1065 settings->setContainerCullingEnabled(prefs.container_culling_enabled); |
| 1066 | 1066 |
| 1067 settings->setAsynchronousSpellCheckingEnabled( | 1067 settings->setAsynchronousSpellCheckingEnabled( |
| 1068 prefs.asynchronous_spell_checking_enabled); | 1068 prefs.asynchronous_spell_checking_enabled); |
| 1069 settings->setUnifiedTextCheckerEnabled(prefs.unified_textchecker_enabled); | 1069 settings->setUnifiedTextCheckerEnabled(prefs.unified_textchecker_enabled); |
| 1070 | 1070 |
| 1071 for (WebInspectorPreferences::const_iterator it = | |
| 1072 prefs.inspector_settings.begin(); | |
| 1073 it != prefs.inspector_settings.end(); | |
| 1074 ++it) { | |
| 1075 web_view->setInspectorSetting(WebString::fromUTF8(it->first), | |
| 1076 WebString::fromUTF8(it->second)); | |
| 1077 } | |
| 1078 | |
| 1079 // Tabs to link is not part of the settings. WebCore calls | 1071 // Tabs to link is not part of the settings. WebCore calls |
| 1080 // ChromeClient::tabsToLinks which is part of the glue code. | 1072 // ChromeClient::tabsToLinks which is part of the glue code. |
| 1081 web_view->setTabsToLinks(prefs.tabs_to_links); | 1073 web_view->setTabsToLinks(prefs.tabs_to_links); |
| 1082 | 1074 |
| 1083 settings->setAllowDisplayOfInsecureContent( | 1075 settings->setAllowDisplayOfInsecureContent( |
| 1084 prefs.allow_displaying_insecure_content); | 1076 prefs.allow_displaying_insecure_content); |
| 1085 settings->setAllowRunningOfInsecureContent( | 1077 settings->setAllowRunningOfInsecureContent( |
| 1086 prefs.allow_running_insecure_content); | 1078 prefs.allow_running_insecure_content); |
| 1087 settings->setPasswordEchoEnabled(prefs.password_echo_enabled); | 1079 settings->setPasswordEchoEnabled(prefs.password_echo_enabled); |
| 1088 settings->setShouldPrintBackgrounds(prefs.should_print_backgrounds); | 1080 settings->setShouldPrintBackgrounds(prefs.should_print_backgrounds); |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2054 | 2046 |
| 2055 int RenderViewImpl::historyForwardListCount() { | 2047 int RenderViewImpl::historyForwardListCount() { |
| 2056 return history_list_length_ - historyBackListCount() - 1; | 2048 return history_list_length_ - historyBackListCount() - 1; |
| 2057 } | 2049 } |
| 2058 | 2050 |
| 2059 void RenderViewImpl::postAccessibilityEvent( | 2051 void RenderViewImpl::postAccessibilityEvent( |
| 2060 const WebAXObject& obj, blink::WebAXEvent event) { | 2052 const WebAXObject& obj, blink::WebAXEvent event) { |
| 2061 main_render_frame()->HandleWebAccessibilityEvent(obj, event); | 2053 main_render_frame()->HandleWebAccessibilityEvent(obj, event); |
| 2062 } | 2054 } |
| 2063 | 2055 |
| 2064 void RenderViewImpl::didUpdateInspectorSetting(const WebString& key, | |
| 2065 const WebString& value) { | |
| 2066 Send(new ViewHostMsg_UpdateInspectorSetting(routing_id_, | |
| 2067 key.utf8(), | |
| 2068 value.utf8())); | |
| 2069 } | |
| 2070 | |
| 2071 // blink::WebWidgetClient ---------------------------------------------------- | 2056 // blink::WebWidgetClient ---------------------------------------------------- |
| 2072 | 2057 |
| 2073 void RenderViewImpl::didFocus() { | 2058 void RenderViewImpl::didFocus() { |
| 2074 // TODO(jcivelli): when https://bugs.webkit.org/show_bug.cgi?id=33389 is fixed | 2059 // TODO(jcivelli): when https://bugs.webkit.org/show_bug.cgi?id=33389 is fixed |
| 2075 // we won't have to test for user gesture anymore and we can | 2060 // we won't have to test for user gesture anymore and we can |
| 2076 // move that code back to render_widget.cc | 2061 // move that code back to render_widget.cc |
| 2077 if (WebUserGestureIndicator::isProcessingUserGesture() && | 2062 if (WebUserGestureIndicator::isProcessingUserGesture() && |
| 2078 !RenderThreadImpl::current()->layout_test_mode()) { | 2063 !RenderThreadImpl::current()->layout_test_mode()) { |
| 2079 Send(new ViewHostMsg_Focus(routing_id_)); | 2064 Send(new ViewHostMsg_Focus(routing_id_)); |
| 2080 } | 2065 } |
| (...skipping 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4311 std::vector<gfx::Size> sizes; | 4296 std::vector<gfx::Size> sizes; |
| 4312 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4297 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4313 if (!url.isEmpty()) | 4298 if (!url.isEmpty()) |
| 4314 urls.push_back( | 4299 urls.push_back( |
| 4315 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4300 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4316 } | 4301 } |
| 4317 SendUpdateFaviconURL(urls); | 4302 SendUpdateFaviconURL(urls); |
| 4318 } | 4303 } |
| 4319 | 4304 |
| 4320 } // namespace content | 4305 } // namespace content |
| OLD | NEW |