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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 280953002: Content side of languagechange event fired on accept languages changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change accept languages default to empty string for tests Created 6 years, 6 months 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
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/test_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after
2874 } 2874 }
2875 2875
2876 void RenderViewImpl::OnDisableScrollbarsForSmallWindows( 2876 void RenderViewImpl::OnDisableScrollbarsForSmallWindows(
2877 const gfx::Size& disable_scrollbar_size_limit) { 2877 const gfx::Size& disable_scrollbar_size_limit) {
2878 disable_scrollbars_size_limit_ = disable_scrollbar_size_limit; 2878 disable_scrollbars_size_limit_ = disable_scrollbar_size_limit;
2879 } 2879 }
2880 2880
2881 void RenderViewImpl::OnSetRendererPrefs( 2881 void RenderViewImpl::OnSetRendererPrefs(
2882 const RendererPreferences& renderer_prefs) { 2882 const RendererPreferences& renderer_prefs) {
2883 double old_zoom_level = renderer_preferences_.default_zoom_level; 2883 double old_zoom_level = renderer_preferences_.default_zoom_level;
2884 std::string old_accept_languages = renderer_preferences_.accept_languages;
2885
2884 renderer_preferences_ = renderer_prefs; 2886 renderer_preferences_ = renderer_prefs;
2885 UpdateFontRenderingFromRendererPrefs(); 2887 UpdateFontRenderingFromRendererPrefs();
2886 2888
2887 #if defined(USE_DEFAULT_RENDER_THEME) 2889 #if defined(USE_DEFAULT_RENDER_THEME)
2888 if (renderer_prefs.use_custom_colors) { 2890 if (renderer_prefs.use_custom_colors) {
2889 WebColorName name = blink::WebColorWebkitFocusRingColor; 2891 WebColorName name = blink::WebColorWebkitFocusRingColor;
2890 blink::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1); 2892 blink::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1);
2891 blink::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); 2893 blink::setCaretBlinkInterval(renderer_prefs.caret_blink_interval);
2892 2894
2893 if (webview()) { 2895 if (webview()) {
(...skipping 14 matching lines...) Expand all
2908 2910
2909 // If the zoom level for this page matches the old zoom default, and this 2911 // If the zoom level for this page matches the old zoom default, and this
2910 // is not a plugin, update the zoom level to match the new default. 2912 // is not a plugin, update the zoom level to match the new default.
2911 if (webview() && !webview()->mainFrame()->document().isPluginDocument() && 2913 if (webview() && !webview()->mainFrame()->document().isPluginDocument() &&
2912 !ZoomValuesEqual(old_zoom_level, 2914 !ZoomValuesEqual(old_zoom_level,
2913 renderer_preferences_.default_zoom_level) && 2915 renderer_preferences_.default_zoom_level) &&
2914 ZoomValuesEqual(webview()->zoomLevel(), old_zoom_level)) { 2916 ZoomValuesEqual(webview()->zoomLevel(), old_zoom_level)) {
2915 webview()->setZoomLevel(renderer_preferences_.default_zoom_level); 2917 webview()->setZoomLevel(renderer_preferences_.default_zoom_level);
2916 zoomLevelChanged(); 2918 zoomLevelChanged();
2917 } 2919 }
2920
2921 if (webview() &&
2922 old_accept_languages != renderer_preferences_.accept_languages) {
2923 webview()->acceptLanguagesChanged();
2924 }
2918 } 2925 }
2919 2926
2920 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, 2927 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location,
2921 const WebMediaPlayerAction& action) { 2928 const WebMediaPlayerAction& action) {
2922 if (webview()) 2929 if (webview())
2923 webview()->performMediaPlayerAction(action, location); 2930 webview()->performMediaPlayerAction(action, location);
2924 } 2931 }
2925 2932
2926 void RenderViewImpl::OnOrientationChange() { 2933 void RenderViewImpl::OnOrientationChange() {
2927 // TODO(mlamouri): consumers of that event should be using DisplayObserver. 2934 // TODO(mlamouri): consumers of that event should be using DisplayObserver.
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
4058 std::vector<gfx::Size> sizes; 4065 std::vector<gfx::Size> sizes;
4059 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4066 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4060 if (!url.isEmpty()) 4067 if (!url.isEmpty())
4061 urls.push_back( 4068 urls.push_back(
4062 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4069 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4063 } 4070 }
4064 SendUpdateFaviconURL(urls); 4071 SendUpdateFaviconURL(urls);
4065 } 4072 }
4066 4073
4067 } // namespace content 4074 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698