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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #include "third_party/WebKit/public/platform/WebPoint.h" | 116 #include "third_party/WebKit/public/platform/WebPoint.h" |
117 #include "third_party/WebKit/public/platform/WebRect.h" | 117 #include "third_party/WebKit/public/platform/WebRect.h" |
118 #include "third_party/WebKit/public/platform/WebSize.h" | 118 #include "third_party/WebKit/public/platform/WebSize.h" |
119 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" | 119 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
120 #include "third_party/WebKit/public/platform/WebString.h" | 120 #include "third_party/WebKit/public/platform/WebString.h" |
121 #include "third_party/WebKit/public/platform/WebURL.h" | 121 #include "third_party/WebKit/public/platform/WebURL.h" |
122 #include "third_party/WebKit/public/platform/WebURLError.h" | 122 #include "third_party/WebKit/public/platform/WebURLError.h" |
123 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 123 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
124 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 124 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
125 #include "third_party/WebKit/public/platform/WebVector.h" | 125 #include "third_party/WebKit/public/platform/WebVector.h" |
| 126 #include "third_party/WebKit/public/public_features.h" |
126 #include "third_party/WebKit/public/web/WebAXObject.h" | 127 #include "third_party/WebKit/public/web/WebAXObject.h" |
127 #include "third_party/WebKit/public/web/WebColorSuggestion.h" | 128 #include "third_party/WebKit/public/web/WebColorSuggestion.h" |
128 #include "third_party/WebKit/public/web/WebDOMEvent.h" | 129 #include "third_party/WebKit/public/web/WebDOMEvent.h" |
129 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" | 130 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" |
130 #include "third_party/WebKit/public/web/WebDataSource.h" | 131 #include "third_party/WebKit/public/web/WebDataSource.h" |
131 #include "third_party/WebKit/public/web/WebDateTimeChooserCompletion.h" | 132 #include "third_party/WebKit/public/web/WebDateTimeChooserCompletion.h" |
132 #include "third_party/WebKit/public/web/WebDateTimeChooserParams.h" | 133 #include "third_party/WebKit/public/web/WebDateTimeChooserParams.h" |
133 #include "third_party/WebKit/public/web/WebDocument.h" | 134 #include "third_party/WebKit/public/web/WebDocument.h" |
134 #include "third_party/WebKit/public/web/WebElement.h" | 135 #include "third_party/WebKit/public/web/WebElement.h" |
135 #include "third_party/WebKit/public/web/WebFileChooserParams.h" | 136 #include "third_party/WebKit/public/web/WebFileChooserParams.h" |
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2206 void RenderViewImpl::OnSetRendererPrefs( | 2207 void RenderViewImpl::OnSetRendererPrefs( |
2207 const RendererPreferences& renderer_prefs) { | 2208 const RendererPreferences& renderer_prefs) { |
2208 std::string old_accept_languages = renderer_preferences_.accept_languages; | 2209 std::string old_accept_languages = renderer_preferences_.accept_languages; |
2209 | 2210 |
2210 renderer_preferences_ = renderer_prefs; | 2211 renderer_preferences_ = renderer_prefs; |
2211 | 2212 |
2212 UpdateFontRenderingFromRendererPrefs(); | 2213 UpdateFontRenderingFromRendererPrefs(); |
2213 UpdateThemePrefs(); | 2214 UpdateThemePrefs(); |
2214 blink::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); | 2215 blink::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); |
2215 | 2216 |
2216 #if defined(USE_DEFAULT_RENDER_THEME) | 2217 #if BUILDFLAG(USE_DEFAULT_RENDER_THEME) |
2217 if (renderer_prefs.use_custom_colors) { | 2218 if (renderer_prefs.use_custom_colors) { |
2218 blink::setFocusRingColor(renderer_prefs.focus_ring_color); | 2219 blink::setFocusRingColor(renderer_prefs.focus_ring_color); |
2219 | 2220 |
2220 if (webview()) { | 2221 if (webview()) { |
2221 webview()->setSelectionColors( | 2222 webview()->setSelectionColors( |
2222 renderer_prefs.active_selection_bg_color, | 2223 renderer_prefs.active_selection_bg_color, |
2223 renderer_prefs.active_selection_fg_color, | 2224 renderer_prefs.active_selection_fg_color, |
2224 renderer_prefs.inactive_selection_bg_color, | 2225 renderer_prefs.inactive_selection_bg_color, |
2225 renderer_prefs.inactive_selection_fg_color); | 2226 renderer_prefs.inactive_selection_fg_color); |
2226 webview()->themeChanged(); | 2227 webview()->themeChanged(); |
2227 } | 2228 } |
2228 } | 2229 } |
2229 #endif // defined(USE_DEFAULT_RENDER_THEME) | 2230 #endif // BUILDFLAG(USE_DEFAULT_RENDER_THEME) |
2230 | 2231 |
2231 if (webview() && | 2232 if (webview() && |
2232 old_accept_languages != renderer_preferences_.accept_languages) { | 2233 old_accept_languages != renderer_preferences_.accept_languages) { |
2233 webview()->acceptLanguagesChanged(); | 2234 webview()->acceptLanguagesChanged(); |
2234 } | 2235 } |
2235 } | 2236 } |
2236 | 2237 |
2237 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, | 2238 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, |
2238 const WebMediaPlayerAction& action) { | 2239 const WebMediaPlayerAction& action) { |
2239 if (webview()) | 2240 if (webview()) |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2793 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2793 } | 2794 } |
2794 | 2795 |
2795 std::unique_ptr<InputEventAck> ack( | 2796 std::unique_ptr<InputEventAck> ack( |
2796 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2797 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
2797 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2798 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2798 OnInputEventAck(std::move(ack)); | 2799 OnInputEventAck(std::move(ack)); |
2799 } | 2800 } |
2800 | 2801 |
2801 } // namespace content | 2802 } // namespace content |
OLD | NEW |