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_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 109 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
110 #include "third_party/WebKit/public/web/WebScriptController.h" | 110 #include "third_party/WebKit/public/web/WebScriptController.h" |
111 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 111 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
112 #include "third_party/WebKit/public/web/WebView.h" | 112 #include "third_party/WebKit/public/web/WebView.h" |
113 #include "third_party/skia/include/core/SkGraphics.h" | 113 #include "third_party/skia/include/core/SkGraphics.h" |
114 #include "ui/base/layout.h" | 114 #include "ui/base/layout.h" |
115 #include "ui/base/ui_base_switches.h" | 115 #include "ui/base/ui_base_switches.h" |
116 #include "v8/include/v8.h" | 116 #include "v8/include/v8.h" |
117 #include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h" | 117 #include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h" |
118 | 118 |
| 119 #if defined(OS_ANDROID) |
| 120 #include <cpu-features.h> |
| 121 #include "content/renderer/android/synchronous_compositor_factory.h" |
| 122 #include "content/renderer/media/android/renderer_demuxer_android.h" |
| 123 #endif |
| 124 |
| 125 #if defined(OS_MACOSX) |
| 126 #include "content/renderer/webscrollbarbehavior_impl_mac.h" |
| 127 #endif |
| 128 |
| 129 #if defined(OS_POSIX) |
| 130 #include "ipc/ipc_channel_posix.h" |
| 131 #endif |
| 132 |
119 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
120 #include <windows.h> | 134 #include <windows.h> |
121 #include <objbase.h> | 135 #include <objbase.h> |
122 #else | 136 #else |
123 // TODO(port) | 137 // TODO(port) |
124 #include "base/memory/scoped_handle.h" | 138 #include "base/memory/scoped_handle.h" |
125 #include "content/child/npapi/np_channel_base.h" | 139 #include "content/child/npapi/np_channel_base.h" |
126 #endif | 140 #endif |
127 | 141 |
128 #if defined(OS_POSIX) | |
129 #include "ipc/ipc_channel_posix.h" | |
130 #endif | |
131 | |
132 #if defined(OS_ANDROID) | |
133 #include <cpu-features.h> | |
134 #include "content/renderer/android/synchronous_compositor_factory.h" | |
135 #include "content/renderer/media/android/renderer_demuxer_android.h" | |
136 #endif | |
137 | |
138 #if defined(ENABLE_PLUGINS) | 142 #if defined(ENABLE_PLUGINS) |
139 #include "content/renderer/npapi/plugin_channel_host.h" | 143 #include "content/renderer/npapi/plugin_channel_host.h" |
140 #endif | 144 #endif |
141 | 145 |
142 using base::ThreadRestrictions; | 146 using base::ThreadRestrictions; |
143 using blink::WebDocument; | 147 using blink::WebDocument; |
144 using blink::WebFrame; | 148 using blink::WebFrame; |
145 using blink::WebNetworkStateNotifier; | 149 using blink::WebNetworkStateNotifier; |
146 using blink::WebRuntimeFeatures; | 150 using blink::WebRuntimeFeatures; |
147 using blink::WebScriptController; | 151 using blink::WebScriptController; |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 } | 1311 } |
1308 #endif | 1312 #endif |
1309 | 1313 |
1310 #if defined(OS_MACOSX) | 1314 #if defined(OS_MACOSX) |
1311 void RenderThreadImpl::OnUpdateScrollbarTheme( | 1315 void RenderThreadImpl::OnUpdateScrollbarTheme( |
1312 float initial_button_delay, | 1316 float initial_button_delay, |
1313 float autoscroll_button_delay, | 1317 float autoscroll_button_delay, |
1314 bool jump_on_track_click, | 1318 bool jump_on_track_click, |
1315 blink::ScrollerStyle preferred_scroller_style, | 1319 blink::ScrollerStyle preferred_scroller_style, |
1316 bool redraw) { | 1320 bool redraw) { |
| 1321 static_cast<WebScrollbarBehaviorImpl*>( |
| 1322 webkit_platform_support_->scrollbarBehavior())->set_jump_on_track_click( |
| 1323 jump_on_track_click); |
1317 blink::WebScrollbarTheme::updateScrollbars(initial_button_delay, | 1324 blink::WebScrollbarTheme::updateScrollbars(initial_button_delay, |
1318 autoscroll_button_delay, | 1325 autoscroll_button_delay, |
1319 jump_on_track_click, | |
1320 preferred_scroller_style, | 1326 preferred_scroller_style, |
1321 redraw); | 1327 redraw); |
1322 } | 1328 } |
1323 #endif | 1329 #endif |
1324 | 1330 |
1325 void RenderThreadImpl::OnMemoryPressure( | 1331 void RenderThreadImpl::OnMemoryPressure( |
1326 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { | 1332 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { |
1327 base::allocator::ReleaseFreeMemory(); | 1333 base::allocator::ReleaseFreeMemory(); |
1328 | 1334 |
1329 if (memory_pressure_level == | 1335 if (memory_pressure_level == |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 hidden_widget_count_--; | 1417 hidden_widget_count_--; |
1412 | 1418 |
1413 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1419 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1414 return; | 1420 return; |
1415 } | 1421 } |
1416 | 1422 |
1417 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1423 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1418 } | 1424 } |
1419 | 1425 |
1420 } // namespace content | 1426 } // namespace content |
OLD | NEW |