| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 #if defined(OS_WIN) | 117 #if defined(OS_WIN) |
| 118 #include <windows.h> | 118 #include <windows.h> |
| 119 #include <objbase.h> | 119 #include <objbase.h> |
| 120 #else | 120 #else |
| 121 // TODO(port) | 121 // TODO(port) |
| 122 #include "base/memory/scoped_handle.h" | 122 #include "base/memory/scoped_handle.h" |
| 123 #include "content/child/npapi/np_channel_base.h" | 123 #include "content/child/npapi/np_channel_base.h" |
| 124 #endif | 124 #endif |
| 125 | 125 |
| 126 #if defined(OS_MACOSX) | |
| 127 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" | |
| 128 #endif | |
| 129 | |
| 130 #if defined(OS_POSIX) | 126 #if defined(OS_POSIX) |
| 131 #include "ipc/ipc_channel_posix.h" | 127 #include "ipc/ipc_channel_posix.h" |
| 132 #endif | 128 #endif |
| 133 | 129 |
| 134 #if defined(OS_ANDROID) | 130 #if defined(OS_ANDROID) |
| 135 #include <cpu-features.h> | 131 #include <cpu-features.h> |
| 136 #include "content/renderer/android/synchronous_compositor_factory.h" | 132 #include "content/renderer/android/synchronous_compositor_factory.h" |
| 137 #include "content/renderer/media/android/renderer_demuxer_android.h" | 133 #include "content/renderer/media/android/renderer_demuxer_android.h" |
| 138 #endif | 134 #endif |
| 139 | 135 |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 if (suspend) { | 1287 if (suspend) { |
| 1292 webkit_platform_support_->SuspendSharedTimer(); | 1288 webkit_platform_support_->SuspendSharedTimer(); |
| 1293 } else { | 1289 } else { |
| 1294 webkit_platform_support_->ResumeSharedTimer(); | 1290 webkit_platform_support_->ResumeSharedTimer(); |
| 1295 } | 1291 } |
| 1296 } | 1292 } |
| 1297 } | 1293 } |
| 1298 #endif | 1294 #endif |
| 1299 | 1295 |
| 1300 #if defined(OS_MACOSX) | 1296 #if defined(OS_MACOSX) |
| 1301 void RenderThreadImpl::OnUpdateScrollbarTheme(float initial_button_delay, | 1297 void RenderThreadImpl::OnUpdateScrollbarTheme( |
| 1302 float autoscroll_button_delay, | 1298 float initial_button_delay, |
| 1303 bool jump_on_track_click, | 1299 float autoscroll_button_delay, |
| 1304 bool redraw) { | 1300 bool jump_on_track_click, |
| 1301 blink::ScrollerStyle preferred_scroller_style, |
| 1302 bool redraw) { |
| 1305 blink::WebScrollbarTheme::updateScrollbars(initial_button_delay, | 1303 blink::WebScrollbarTheme::updateScrollbars(initial_button_delay, |
| 1306 autoscroll_button_delay, | 1304 autoscroll_button_delay, |
| 1307 jump_on_track_click, | 1305 jump_on_track_click, |
| 1306 preferred_scroller_style, |
| 1308 redraw); | 1307 redraw); |
| 1309 } | 1308 } |
| 1310 #endif | 1309 #endif |
| 1311 | 1310 |
| 1312 void RenderThreadImpl::OnMemoryPressure( | 1311 void RenderThreadImpl::OnMemoryPressure( |
| 1313 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { | 1312 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { |
| 1314 base::allocator::ReleaseFreeMemory(); | 1313 base::allocator::ReleaseFreeMemory(); |
| 1315 | 1314 |
| 1316 if (memory_pressure_level == | 1315 if (memory_pressure_level == |
| 1317 base::MemoryPressureListener::MEMORY_PRESSURE_CRITICAL) { | 1316 base::MemoryPressureListener::MEMORY_PRESSURE_CRITICAL) { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 hidden_widget_count_--; | 1401 hidden_widget_count_--; |
| 1403 | 1402 |
| 1404 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1403 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1405 return; | 1404 return; |
| 1406 } | 1405 } |
| 1407 | 1406 |
| 1408 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1407 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1409 } | 1408 } |
| 1410 | 1409 |
| 1411 } // namespace content | 1410 } // namespace content |
| OLD | NEW |