Chromium Code Reviews| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4253 renderer_preferences_ = renderer_prefs; | 4253 renderer_preferences_ = renderer_prefs; |
| 4254 UpdateFontRenderingFromRendererPrefs(); | 4254 UpdateFontRenderingFromRendererPrefs(); |
| 4255 #if defined(TOOLKIT_USES_GTK) | 4255 #if defined(TOOLKIT_USES_GTK) |
| 4256 WebColorName name = WebKit::WebColorWebkitFocusRingColor; | 4256 WebColorName name = WebKit::WebColorWebkitFocusRingColor; |
| 4257 WebKit::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1); | 4257 WebKit::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1); |
| 4258 WebKit::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); | 4258 WebKit::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); |
| 4259 gfx::NativeTheme::instance()->SetScrollbarColors( | 4259 gfx::NativeTheme::instance()->SetScrollbarColors( |
| 4260 renderer_prefs.thumb_inactive_color, | 4260 renderer_prefs.thumb_inactive_color, |
| 4261 renderer_prefs.thumb_active_color, | 4261 renderer_prefs.thumb_active_color, |
| 4262 renderer_prefs.track_color); | 4262 renderer_prefs.track_color); |
| 4263 #endif | |
| 4263 | 4264 |
| 4265 #if defined(OS_CHROMEOS) or defined(TOOLKIT_USES_GTK) | |
|
Daniel Erat
2012/03/22 22:56:13
i am skeptical that this compiles -- you have 'or'
Ben Goodger (Google)
2012/03/22 23:04:36
given the previous file also, USE_ASH
Mr4D (OOO till 08-26)
2012/03/22 23:15:53
Good one! (too much Python and JS programming for
Mr4D (OOO till 08-26)
2012/03/22 23:15:53
Done.
| |
| 4264 if (webview()) { | 4266 if (webview()) { |
| 4267 #if defined(TOOLKIT_USES_GTK) | |
| 4265 webview()->setScrollbarColors( | 4268 webview()->setScrollbarColors( |
| 4266 renderer_prefs.thumb_inactive_color, | 4269 renderer_prefs.thumb_inactive_color, |
| 4267 renderer_prefs.thumb_active_color, | 4270 renderer_prefs.thumb_active_color, |
| 4268 renderer_prefs.track_color); | 4271 renderer_prefs.track_color); |
| 4272 #endif | |
| 4269 webview()->setSelectionColors( | 4273 webview()->setSelectionColors( |
| 4270 renderer_prefs.active_selection_bg_color, | 4274 renderer_prefs.active_selection_bg_color, |
| 4271 renderer_prefs.active_selection_fg_color, | 4275 renderer_prefs.active_selection_fg_color, |
| 4272 renderer_prefs.inactive_selection_bg_color, | 4276 renderer_prefs.inactive_selection_bg_color, |
| 4273 renderer_prefs.inactive_selection_fg_color); | 4277 renderer_prefs.inactive_selection_fg_color); |
| 4274 webview()->themeChanged(); | 4278 webview()->themeChanged(); |
| 4275 } | 4279 } |
| 4276 #endif | 4280 #endif |
| 4281 | |
| 4277 // If the zoom level for this page matches the old zoom default, and this | 4282 // If the zoom level for this page matches the old zoom default, and this |
| 4278 // is not a plugin, update the zoom level to match the new default. | 4283 // is not a plugin, update the zoom level to match the new default. |
| 4279 if (webview() && !webview()->mainFrame()->document().isPluginDocument() && | 4284 if (webview() && !webview()->mainFrame()->document().isPluginDocument() && |
| 4280 content::ZoomValuesEqual(webview()->zoomLevel(), old_zoom_level)) { | 4285 content::ZoomValuesEqual(webview()->zoomLevel(), old_zoom_level)) { |
| 4281 webview()->setZoomLevel(false, renderer_preferences_.default_zoom_level); | 4286 webview()->setZoomLevel(false, renderer_preferences_.default_zoom_level); |
| 4282 zoomLevelChanged(); | 4287 zoomLevelChanged(); |
| 4283 } | 4288 } |
| 4284 } | 4289 } |
| 4285 | 4290 |
| 4286 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, | 4291 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5194 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5199 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5195 return !!RenderThreadImpl::current()->compositor_thread(); | 5200 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5196 } | 5201 } |
| 5197 | 5202 |
| 5198 void RenderViewImpl::OnJavaBridgeInit() { | 5203 void RenderViewImpl::OnJavaBridgeInit() { |
| 5199 DCHECK(!java_bridge_dispatcher_.get()); | 5204 DCHECK(!java_bridge_dispatcher_.get()); |
| 5200 #if defined(ENABLE_JAVA_BRIDGE) | 5205 #if defined(ENABLE_JAVA_BRIDGE) |
| 5201 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5206 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 5202 #endif | 5207 #endif |
| 5203 } | 5208 } |
| OLD | NEW |